I have two simple tables: Projectsand SubProjects, which I would like to print each subproject with the corresponding project in the 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 would like to know why I get No reference from table Admin_Model_SubProjects to table Admin_Model_Projectson typing<?php echo $entry->findParentRow('Admin_Model_Projects'); ?>
source
share