New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot order by multiple columns #775
Labels
bug
Something isn't working
Comments
What results do you get when you run this same query in the SQL editor? from my tests I get the same result from the SQL editor and the library. Here is the SQL equivalent of your code above: SELECT *
FROM "public"."clones"
WHERE "owner" = 'your_uid_here'
ORDER BY "last_chatted" DESC, "created_at" DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Describe the bug
When trying to order multiple columns by using multiple .order() modifiers on a select function, the result only orders by the first column specified.
To Reproduce
Here is my code to get some rows from a table, which is then ordered first by last_chatted and then by created_at.
Expected behavior
The response should be ordered by last_chatted, and then created_at. However, this is not the case and the result is only ordered by last_chatted. I have confirmed that when I only order by last_chatted and created_at separately the code works as expected. I have also confirmed using the sort by visualization on my Supabase dashboard that the chained ordering is different from the result I get.
System information
Additional context
The same issue was reported in Discord in December, but no GitHub issue was created.
The text was updated successfully, but these errors were encountered: