I have this model:
class Application_Model_Categories extends Zend_Db_Table_Abstract
{
protected $_name = 'categories';
protected $_referenceMap = array(
'Stores' => array (
'columns' => 'store_id',
'refTableClass' => 'Application_Model_Races',
'refColumns' => 'id')
);
}
Then in my controller:
$race = new Application_Model_Races();
$find = $this->race->find(1);
$current = $find->current();
$categories = $current->findDependentRowset('Application_Model_Categories');
this is returning all the categories. i need to apply a filter to return only the categories with parentId = 0
I´m new to ZF1 so if you also see that im getting the data incorrectly in the controller please let me know. thank you