Skip to content
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

has_many relationships are not correctly sorted by id ascending as they should be. #254

Open
ptarud opened this issue Aug 15, 2024 · 0 comments

Comments

@ptarud
Copy link

ptarud commented Aug 15, 2024

has_many relationships are not correctly sorted by id ascending as they should be, that cause the user should specify in the relationship the order. This is not a common behaviour in RoR, because if for anything we need to sort it by id descending the query that it generates will be SELECT * FROM table_name ORDER BY table_name.id ASC AND table_name.id DESC, and nobody wants to have to do a reorder every time they wants ordering by a different attribute.

I have not tested yet if it happens the same behaviour for "parent" tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant