Order parent and children? #229
-
In an
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Hey @richcorbs. Can you try doing it as: supabase
.from("parents")
.select("*, children(*)")
.order('name', { ascending: false})
.order('name', { foreignTable: 'children', ascending: false}) (I'm getting the example from a postgrest-js test) |
Beta Was this translation helpful? Give feedback.
-
If you're on the current version of supabase
.from("parents")
.select("*, children(*)")
.order('name.desc')
.order('children.name.desc') |
Beta Was this translation helpful? Give feedback.
-
Something weird is going on: This order: Generates this query string: But this order: Generates this query string: But I get back the following finishers with time_in_seconds:
The only difference is the |
Beta Was this translation helpful? Give feedback.
-
No matter how I try to sort finishers it sorts by inserted_at (or updated_at since they are the same). |
Beta Was this translation helpful? Give feedback.
Hey @richcorbs.
Can you try doing it as:
(I'm getting the example from a postgrest-js test)