I am new to fuelphp.Need to add order_by for parent table: order by username asc, parent_table_field asc. I tried following code:
Model_Definition::find('all',
Array
(
[related] => Array
(
[users] => Array
(
[order_by] => Array
(
[username] => asc
)
)
)
[order_by] => Array
(
[parent_table_field] => asc
)
[rows_limit] => 50
[rows_offset] => 0
)
)
But it applies order by for parent-table’s field first and then for username.
You can not control the way the query is generated using array notation.
You’ll have more control with method chaining, which will apply the order_by clauses in the sequence in which they are defined.