Replies: 2 comments 3 replies
-
Hello! Yes, that preparation should be moved to be a sort on the relationship, and that's a change we'll be making for the next version of the Ash Framework book. In your example, both sorts are applied - the default sort takes precedence as a global sort and will be applied first, and then the relationship sort will come second. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Added in #1786 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm following examples from "Ash Framework" book and I was wondering if it's possible to override sort defined in resource preparations block in the relationship.
Example:
When preloading albums through artist (
ar = Tunez.Music.read_artist("43159369-82f2-4b51-a370-9dfb80786cfa", load: :albums
):A following query is used (
ORDER BY a0."year", a0."year" DESC
):Thanks!
Beta Was this translation helpful? Give feedback.
All reactions