Im having trouble understanding this example and applying it to my
situation was wondering if anyone can help

I want to fetch a dependent rowset in a table and order the results by
a specific field in that table.

The example in the docs says this :

$accountsTable      = new Accounts();
$accountsRowset     = $accountsTable->find(1234);
$user1234           = $accountsRowset->current();
$select             = $accountsTable->select()->order('name ASC');

$bugsAssignedToUser = $user1234->findDependentRowset('Bugs',
'Engineer', $select)

However I do not have the 2nd table reference so I would be doing, for
my example I have Recipe that has many Ingredients, so Im doing

$r      = new Recipe();
$rRowset     = $r->find(1234);
$recipe   = $rRowset->current();

$ingredientsForRecipe = $recipe->findDependentRowset('Ingredients')

Now I want to sort the $ingredientsForRecipe rowset in a certain order
say by their id number, Ive tried

$select = $r->select()->order( 'id ASC' );
$ingredientsForRecipe = $recipe->findDependentRowset('Ingredients', $select);

But thats not working, any help appreciated, might be a good idea to
expand the examples a bit in this area?

Cheers
- Xaviar

Reply via email to