The main reason for doing the split in compiler is that we gain a bit
simpler Query class without any significant complications to the where
class.
There are other cases, too, where such a split would be needed. For
example, window aggregates can't be filtered on the same query level. So,
`qs.filter(row_num__lte=10)` would need to be splitted into an outer
query's where clause.
--
Ticket URL: <https://code.djangoproject.com/ticket/24268>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted
Comment:
[https://github.com/django/django/pull/3779 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/24268#comment:1>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/24268#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"afe0bb7b13bb8dc4370f32225238012c873b0ee3"]:
{{{
#!CommitTicketReference repository=""
revision="afe0bb7b13bb8dc4370f32225238012c873b0ee3"
Fixed #24268 -- removed Query.having
Instead of splitting filter clauses to where and having parts before
adding them to query.where or query.having, add all filter clauses to
query.where, and when compiling the query split the where to having and
where parts.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24268#comment:3>