#26434: Inconsistent results of QuerySet.count() when ordering is not a subset
of
explicit grouping.
-------------------------------------+-------------------------------------
Reporter: kamandol | Owner: Michal
| Mládek
Type: Bug | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: postgresql queryset | Triage Stage: Accepted
count annotate aggreagate |
order_by |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Michal Mládek):
Ah, I see — so even though my implementation with eagerly resolving
order_by() aliases could technically work (since it was operating on a
cloned query), it’s not ideal because it also affects other ORM components
that rely on clear_ordering() being called in specific contexts.
That makes sense — since the underlying issue is within get_aggregation(),
moving the logic there should be straightforward. Thanks for clarifying!
--
Ticket URL: <https://code.djangoproject.com/ticket/26434#comment:37>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019a3954bbe4-7d373369-9573-4ca6-8a98-f46cb666a300-000000%40eu-central-1.amazonses.com.