Details
Description
Since Zend_Db_Table_Row_Abstract::findDependentRowset() uses Zend_Db_Table_Abstract::fetchAll() to return value, it could be a good idea to specify also $order, $count, $offset.
Zend_Db_Table_Row_Abstract::findDependentRowset(
$dependentTable, $ruleKey,
$order, $count, $offset);
At this moment Zend_Db_Table_Row_Abstract::findDependentRowset() return all related records, but what if programmer needs only few?
Lets take real life egzample. There's a table of galleries (id, title, description, created_at, updated_at) and related table of images (id, description, created_at, updated_at, gallery_id).
On the main page of this gallery app I want to show galleries and 5 images for each of them. Using Zend_Db_Table_Row_Abstract::findDependentRowset() - without $count, $offset - makes impossible to achieve that. I mean there is no problem, but I do not need all related rows - it could be a reason. of unwanted database overheat (huge amount of related records?).
And what about $order? Assume that each image has its own rate (another column) and images on mentioned main page are highest rated. Once again I am forced to "play" with plain PHP (own select statements/objects).
Cheers, Alan "LBO" Bem.
Issue Links
| This issue is duplicated by: | ||||
| ZF-1674 | Allow row relationship methods to specify WHERE, ORDER and LIMIT clauses |
|
|
|
Reformat summary, description.