Otóż chciałbym zastosować niezwykle przydatny wynalazek jakim jest Zend_Db_Table Relationships
Napisalem Model głównej tabeli:
class Admin_Model_Contents extends Zend_Db_Table_Abstract { protected $_name = 'contents'; 'refTableClass' => 'ContentsDescriptions', ) ); // ...
chciałem ją połaczyć z tabelą contents_descriptions
class Admin_Model_ContentsDescriptions extends Zend_Db_Table_Abstract { protected $_name = 'contents_descriptions'; protected $_primary = 'contents_id'; protected $_sequence = true; }
Po odpaleniu kodu w Modelu Contents:
$row = $this->fetchAll(); $current = $row->current(); $desc = $current->findDependentRowset('ContentsDescriptions');
Otrzymuje w prezencie:
Plik istnieje w tym samym katalogu co Model Contents więc co jest grane ?