#18375: F() doesn't work as expected across multijoin relations
-------------------------------------+-------------------------------------
     Reporter:  FunkyBob             |                    Owner:  akaariai
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:
     Severity:  Release blocker      |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by akaariai):

 The patch is stale. The compare view is misleading, as it now compares my
 current master instead of the master at the time of when I created that
 patch... Maybe using that compare view isn't such a good idea after all.
 Updated patch available from here:
 
https://github.com/akaariai/django/commit/bf6f1def617176503f2fc1c1e81c45c4b1b6fff2

 As for what is the use case? Something like
 `People.objects.filter(friends__age__gt=F('friends__age') * 2)`. This of
 course can't be true for single join, but multijoin case returns any
 people who have friends with 2x difference in age. Not too realistic
 example, but to me it seems there could be some real use cases for this.

 IMO if we can get good notes about the backwards compatibility hack it
 doesn't cost us much in code complexity.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18375#comment:15>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to