In an action, how can I sort on a field in a relation?
I have an action performing a read operation with a specific relation loaded. That relation contains a
position
field that I wish to sort on first, then the primary id create_ts.
That obviously doesn't work, but it is what I wish to accomplish.1 Reply
The current way is by adding an aggregate
And then you can sort on
sort: [:status_position, :create_ts]
We will likely add support for using to_one
and has_one
style relationships directly in sort