#33929: Field Reference in FilteredRelation Does Not Recognize Previously 
Defined
FilteredRelation
-------------------------------------+-------------------------------------
     Reporter:  Matt                 |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  4.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  duplicate
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 I agree with Mariusz and I think this has the exact same root cause as
 #33766 and detailed in
 [https://code.djangoproject.com/ticket/33766#comment:5 this comment].

 The gist of it is that filter relations
 
[https://github.com/django/django/blob/9dff316be41847c505ebf397e4a52a0a71e0acc4/django/db/models/query_utils.py#L376-L380
 conditions are resolved very late in the process of SQL compilation]
 (basically when the `FROM` clause is generated) and thus the resolving of
 references to filtered relation induced joins alias can be  off.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33929#comment:3>
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/01070182aa42f5f6-23e8741f-2333-4866-a2be-ccf8a6ce26bc-000000%40eu-central-1.amazonses.com.

Reply via email to