/** * Finds the related objects for the specified active record. * This method is internally invoked by {@link \Database\ActiveRecord\Record} to support lazy loading. * @param \Database\ActiveRecord\Record $baseRecord the base record whose related objects are to be loaded */ public function lazyFind($baseRecord) { $this->_joinTree->lazyFind($baseRecord); if (!empty($this->_joinTree->children)) { foreach ($this->_joinTree->children as $child) { $child->afterFind(); } } $this->destroyJoinTree(); }