mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
[3.1.x] Fixed #31568 -- Fixed alias reference when aggregating over multiple subqueries.
691def10a0
made all Subquery() instances equal to each other which broke aggregation subquery pushdown which relied on object equality to determine which alias it should select. Subquery.__eq__() will be fixed in an another commit but Query.rewrite_cols() should haved used object identity from the start. Refs #30727, #30188. Thanks Makina Corpus for the report. Backport ofadfbf653dc
from master
This commit is contained in:
parent
8cb87a3f7c
commit
3913acdb29
3 changed files with 26 additions and 2 deletions
|
@ -15,3 +15,6 @@ Bugfixes
|
|||
* Fixed a regression in Django 3.0 where ``QuerySet.values()`` and
|
||||
``values_list()`` crashed if a queryset contained an aggregation and a
|
||||
subquery annotation (:ticket:`31566`).
|
||||
|
||||
* Fixed a regression in Django 3.0 where aggregates used wrong annotations when
|
||||
a queryset has multiple subqueries annotations (:ticket:`31568`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue