citusdata / citusdata/activerecord-multi-tenant

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

Open
#254 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
759
Forks
113
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.