. */ Doctrine::autoload('Doctrine_Relation'); /** * Doctrine_LocalKey * This class represents a local key relation * * @author Konsta Vesterinen * @license LGPL * @package Doctrine */ class Doctrine_LocalKey extends Doctrine_Relation { public function fetch($id = null) { if(empty($id)) return $this->table->create(); else { $record = $this->table->find($id); return ($record !== false) ? $record : $this->table->create(); } } }