Closed speeddragon closed 7 years ago
Thank you for the report @speeddragon 🙌. I will take a look into this bug.
This should be now fixed with the 2.0.2 release.
I am closing this issue since it has been fixed two weeks ago. Feel free to open a new one if you encounter any more problems!
I'm trying to order a query result by a specific field in a language, but I don't see any examples and my attempt to doing doesn't work.
I'm trying something like this:
order_by(asc: translated(FoodItem, :name, ^language))
And the error on compile is the following,
language
is always an atom, but I don't understand how is checking in compile time instead in runtime.I managed to get this work by using fragment,
|> order_by(asc: fragment("translations -> ? -> 'name'", ^Atom.to_string(language)))