Show
Ignore:
Timestamp:
03/17/2008 09:34:05 AM (10 months ago)
Author:
Shadowhand
Message:

Added find(TRUE) support, to reload the current object

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/ORM.php

    r2300 r2311  
    545545         * Find and load data for the current object. 
    546546         * 
    547          * @param   string   id of the object to find, or ALL 
     547         * @param   string   id of the object to find, an array, or TRUE to reload 
    548548         * @param   boolean  return the result, or load it into the current object 
    549549         * @return  object   object instance 
     
    559559                if ($this->where === FALSE AND ! empty($id)) 
    560560                { 
    561                         if (is_array($id)) 
     561                        if ($id === TRUE) 
     562                        { 
     563                                self::$db->where($this->object->id); 
     564                        } 
     565                        elseif (is_array($id)) 
    562566                        { 
    563567                                self::$db->where($id);