I have two simple tables: Projects
and SubProjects
which I'd like to print every subproject with the respective project in a table.
So I wrote this:
class Admin_Model_Projects extends Zend_Db_Table_Abstract
{
protected $_name = 'main_projects';
protected $_primary = 'mai_id';
protected $_sequence = true;
protected $_dependentTables = array('Admin_Model_SubProjects');
....
And this:
class Admin_Model_SubProjects extends Zend_Db_Table_Abstract
{
protected $_name = 'sub_projects';
protected $_primary = 'sub_id';
protected $_sequence = true;
protected $_referenceMap = array(
'columns' => 'mai_id',
'refTableClass' => 'Admin_Model_Projects',
'refColumns' => 'mai_id'
);
.....
I'd like to know why do I get No reference from table Admin_Model_SubProjects to table Admin_Model_Projects
when I type <?php echo $entry->findParentRow('Admin_Model_Projects'); ?>