Ash FrameworkAF
Ash Framework3y ago
4 replies
JeremyC

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.

prepare build(load: [:status], sort: [:status.position, :create_ts])


That obviously doesn't work, but it is what I wish to accomplish.
Was this page helpful?