Witam,

Otóż chciałbym zastosować niezwykle przydatny wynalazek jakim jest Zend_Db_Table Relationships

Napisalem Model głównej tabeli:


  1.  
  2. class Admin_Model_Contents extends Zend_Db_Table_Abstract
  3. {
  4.  
  5. protected $_name = 'contents';
  6. protected $_primary = array('id');
  7. protected $_dependentTables = array('ContentsDescriptions');
  8.  
  9.  
  10. protected $_referenceMap = array(
  11. 'ContentsDescriptions' => array(
  12. 'columns' => array('id'),
  13. 'refTableClass' => 'ContentsDescriptions',
  14. 'refColumns' => array('contents_id')
  15. )
  16. );
  17.  
  18.  
  19. // ...
  20.  


chciałem ją połaczyć z tabelą contents_descriptions



  1.  
  2. class Admin_Model_ContentsDescriptions extends Zend_Db_Table_Abstract
  3. {
  4. protected $_name = 'contents_descriptions';
  5. protected $_primary = 'contents_id';
  6. protected $_sequence = true;
  7. }
  8.  
  9.  


Po odpaleniu kodu w Modelu Contents:

  1.  
  2. $row = $this->fetchAll();
  3. $current = $row->current();
  4. $desc = $current->findDependentRowset('ContentsDescriptions');
  5.  
  6.  


Otrzymuje w prezencie:

  1.  
  2. Message: File "ContentsDescriptions.php" does not exist or class "ContentsDescriptions" was not found in the file
  3.  


Plik istnieje w tym samym katalogu co Model Contents więc co jest grane ?