i have a class Items and it has Transactions
class Lab_Models_Items extends Zend_Db_Table_Abstract {
protected $_name = "lab-items";
protected $_rowClass = "Lab_Models_ItemRow";
protected $_dependentTables = array('Lab_Models_Transactions',
'Lab_Models_Allocations');
protected $_referenceMap = array(
"Category" => array(
'columns' => 'cat',
'refTableClass' => 'Lab_Models_Categories',
'refColumns' => 'id'
)
);
}
class Lab_Models_Transactions extends Zend_Db_Table_Abstract {
protected $_name = "lab-transactions";
protected $_referenceMap = array(
"Item" => array(
'columns' => 'item',
'refTableClass' => 'Lab_Models_Items',
'refColumns' => 'id'
)
);
}
i want to find all transactions from a item whose transaction's unit price
column is more that 500. how can i do that?
Ralph Schindler-2 wrote:
>
>
>
>>
>> $bugsAssignedToUser = $user1234->findDependentRowset('Bugs', 'Engineer');
>>
>> meaning 'Engineer' is in which table?
>>
>
> Rule names are the keys of the arrays that are specified in the
> 'referenceMap' of the Bugs table. the find* methods will look to those
> tables for the actual reference and load the appropriate rowsets.
>
> Hope that helps,
> -ralph
>
>
--
View this message in context: http://www.nabble.com/findDependentRowset---selects-tp23592902p23648524.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论