#26815 closed Bug (invalid)
Addition of Trunc may have altered the ordering of dates() queries
Reported by: | Luke Benstead | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.10 |
Severity: | Normal | Keywords: | dates, queryset |
Cc: | Josh Smeaton | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
We're looking into supporting Django 1.10 in Djangae, and while fixing up some breakages I noticed a change in the way that dates() queries are ordered. I'm not 100% sure this is a real bug as I'm looking at the code in a fairly abnormal situation, but it definitely seems like a bug...
This line was recently added as part of the datetime expression changes:
It seems to me that now, instead of ordering by the full date, this change will make dates queries order by just the component that they are selecting (e.g. year, month, day etc.) - although I might be wrong about this!
Change History (4)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
Does this assertion show the expected behavior?
comment:4 by , 8 years ago
Resolution: | needsinfo → invalid |
---|
Could you provide example queries to demonstrate the bug?