public function initRelated(Doctrine_Record $record, $name) { if (!isset($this->_initializedRelations[$record->getOid()][$name])) { $relation = $record->getTable()->getRelation($name); $coll = new Doctrine_Collection($relation->getTable()->getComponentName()); $coll->setReference($record, $relation); $record[$name] = $coll; $this->_initializedRelations[$record->getOid()][$name] = true; } return true; }