#16554: Unnecessary join when using a reverse foreign-key relationship in 
separate
filter or aggregate calls
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  bendavis78                         |         Status:  closed
                   Type:  Bug        |      Component:  Database layer
              Milestone:             |  (models, ORM)
                Version:  SVN        |       Severity:  Normal
             Resolution:  invalid    |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |    Needs tests:  0
    Needs documentation:  0          |  Easy pickings:  0
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
Changes (by russellm):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => invalid
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 This is working as designed.

 A single filter() clause is used to determine the join-sharing
 relationships in a query; Model.objects.filter(Q1, Q2) is not
 *necessarily* equivalent to Model.objects.filter(Q1).filter(Q2).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16554#comment:1>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to