#36025: __range lookup in conditional aggregate with subquery annotation does 
not
use annotated related fields
-------------------------------------+-------------------------------------
     Reporter:  Aashay Amballi       |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  ORM                  |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

 * resolution:   => fixed
 * status:  assigned => closed

Comment:

 In [changeset:"089deb82b9ac2d002af36fd36f288368cdac4b53" 089deb82]:
 {{{#!CommitTicketReference repository=""
 revision="089deb82b9ac2d002af36fd36f288368cdac4b53"
 Fixed #36025 -- Fixed re-aliasing of iterable (in/range) lookups rhs.

 In order for Expression.relabeled_clone to work appropriately its
 get_source_expressions method must return all resolvable which wasn't the
 case
 for Lookup when its right-hand-side is "direct" (not a compilable).

 While refs #22288 added support for non-literals iterable right-hand-side
 lookups it predated the subclassing of Lookup(Expression) refs #27021
 which
 could have been an opportunity to ensure right-hand-sides are always
 resolvable
 (ValueList and ExpressionList).

 Addressing all edge case with non-resolvable right-hand-sides would
 require
 a significant refactor and deprecation of some parts of the Lookup
 interface so
 this patch only focuses on FieldGetDbPrepValueIterableMixin (In and Range
 lookups) by making sure that a right-hand-side containing resolvables are
 dealt
 with appropriately during the resolving phase.

 Thanks Aashay Amballi for the report.
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36025#comment:9>
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/01070194dbfb55ef-305e8266-9491-4332-9576-c204647fd23f-000000%40eu-central-1.amazonses.com.

Reply via email to