How would you solve this problem? I'm using AR.
b belongs to a (HAS_ONE)
i want to select n amount of rows from b and order by column dateTime in table a.
And if i also would like to select some columns from table a in the same time, how would that command look like?
Note, you need to declare 'alias' option of relation 'a' to be 'a'.
Oh, and is it possible to use the select parameter in criteria, do i just specify the column with table prefix infront (eg. a.column) or am i limited to selecting all columns?
Sorry im unable to try this out for a while, thats why im asking and not testing myself.
Yes, you can pass a select key with a comma-separated string of fields. Make sure to use alias if there are ambiguous columns.