Php 如何使用具有多对多关系的Zend_Db_表

Php 如何使用具有多对多关系的Zend_Db_表,php,zend-framework,many-to-many,relational-database,Php,Zend Framework,Many To Many,Relational Database,如何将Zend's与连接表一起使用?有没有提供这种虚构性的内置方法,或者必须编写简单的SQL?文档中有: 要获取行,请执行以下操作: $row->findManyToManyRowset($table, $intersectionTable, [$rule1, [$rule2,

如何将Zend's与连接表一起使用?有没有提供这种虚构性的内置方法,或者必须编写简单的SQL?

文档中有:

要获取行,请执行以下操作:

$row->findManyToManyRowset($table,
                           $intersectionTable,
                           [$rule1,
                               [$rule2,
                                   [Zend_Db_Table_Select $select]
                               ]
                           ]);
// Example
$productsRowset = $bug1234->findManyToManyRowset('Products',
                                                 'BugsProducts');
// Here, BugsProducts is the junction table
但是,对于一对多关系,还需要在类中定义关系: