2009年10月22日星期四

Re: [fw-db] findManyToManyRowset

Usually you have to create a reference map like in this example:
http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.defining
http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.defining

Roozbeh Matloobi wrote:
>
> Hi,
>
> I have 2 tables joined together but I dont know how to refrence them
> through zend frame work.
>
> I am calling $this->findManyToManyRowset('Subs',
> 'Client_Directories_Subs') function but I have bellow error
>
> Uncaught exception 'Zend_Db_Table_Exception' with message 'No reference
> from table Client_Directories_Subs to table Client_Directories' in
> C:\roozbeh\repo\newskool\repo\library\Zend\Db\Table\Abstract.php:397
> Stack trace: #0
> C:\roozbeh\repo\newskool\repo\library\Zend\Db\Table\Row\Abstract.php(862):
> Zend_Db_Table_Abstract->getReference('Client_Director...', NULL) #1
> C:\roozbeh\repo\newskool\repo\library\Zend\Db\Table\Row\Abstract.php(1073):
> Zend_Db_Table_Row_Abstract->_prepareReference(Object(Client_Directories_Subs),
> Object(Client_Directories), NULL) #2
> C:\roozbeh\repo\newskool\repo\application\models\Client\Directories\Row.php(75):
> Zend_Db_Table_Row_Abstract->findManyToManyRowset('Subs',
> 'Client_Director...') #3
> C:\roozbeh\repo\newskool\repo\library\Modules\Client\Search\Lucene.php(56):
> Client_Directories_Row->subs() #4
> C:\roozbeh\repo\newskool\repo\application\modules\client\controllers\DirectoriesController.php(88):
> Modules_Client_Search_lucene->rebuild() #5
> C:\roozbeh\repo\newskool\repo\library\Zend\Contro in
> *C:\roozbeh\repo\newskool\repo\library\Zend\Db\Table\Abstract.php* on
> line *397
>
> much appriciate for any help
>
> Thanks
> *
>
>

--
View this message in context: http://www.nabble.com/findManyToManyRowset-tp25986793p26008206.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: