We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How would I run a query similar to: sort({'embedded.field': -1})?
sort({'embedded.field': -1})
I have tried order_by(desc: "embedded.field") and order_by(fragment("embedded.field")) doesn't work.
order_by(desc: "embedded.field")
order_by(fragment("embedded.field"))
The text was updated successfully, but these errors were encountered:
I was trying to get a similar query to work, and after some trial and error I think I found something that works:
from(c in SomeEctoSchema, # ... order_by: [desc: c."embedded.field"], # ... ) |> MyApp.Repo.all()
The logs print:
{"$orderby", ["embedded.field": -1]}
And I get apparently correct results.
Sorry, something went wrong.
No branches or pull requests
How would I run a query similar to:
sort({'embedded.field': -1})
?I have tried
order_by(desc: "embedded.field")
andorder_by(fragment("embedded.field"))
doesn't work.The text was updated successfully, but these errors were encountered: