#28477: Strip unused annotations from count queries -------------------------------------+------------------------------------- Reporter: Tom Forbes | Owner: Simon Type: | Charette Cleanup/optimization | Status: closed Component: Database layer | Version: dev (models, ORM) | Severity: Normal | Resolution: fixed Keywords: | Triage Stage: Ready for | checkin Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by GitHub <noreply@…>): In [changeset:"10037130c123cd747d32a14a9ba47e0c5c9a37d1" 1003713]: {{{ #!CommitTicketReference repository="" revision="10037130c123cd747d32a14a9ba47e0c5c9a37d1" Refs #28477 -- Fixed handling aliased annotations on aggregation. Just like when using .annotate(), the .alias() method will generate the necessary JOINs to resolve the alias even if not selected. Since these JOINs could be multi-valued non-selected aggregates must be considered to require subquery wrapping as a GROUP BY is required to combine duplicated tuples from the base table. Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/28477#comment:17> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018474751dd6-8106243f-da5f-4ec8-a09d-f7db7902154a-000000%40eu-central-1.amazonses.com.