PHP on T R A X
Rapid Application Development Made Easy

Changeset 307 for trunk/trax

Show
Ignore:
Timestamp:
08/20/08 09:49:55 (3 months ago)
Author:
john
Message:

changed find_all building records array to index on blank if no index is set

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/trax/vendor/trax/active_record.php

    r297 r307  
    13861386                if($field == $this->index_on) { 
    13871387                    $objects_key = $value; 
    1388                 } 
    1389             } 
    1390             $objects[$objects_key] = $object; 
     1388                }  
     1389            } 
     1390            if(is_null($objects_key)) { 
     1391                $objects[] = $object; 
     1392            } else { 
     1393                $objects[$objects_key] = $object; 
     1394            } 
    13911395            # If callback is defined in model run it. 
    13921396            # this will probably hurt performance...