Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [ZendFramework] Zend_Db_Table Relationships, Nie widzi plików Modeli dołączonych do relacji :/
Sajrox
post
Post #1





Grupa: Zarejestrowani
Postów: 254
Pomógł: 7
Dołączył: 9.10.2007
Skąd: Poznań

Ostrzeżenie: (0%)
-----


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 ?



Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 18:13