#10623: scheme for filtering an object based on a ManyToManyField or a reverse
ForeignKeyField
------------------------------------+---------------------------------------
          Reporter:  while0pass     |         Owner:  nobody
            Status:  closed         |     Milestone:        
         Component:  Documentation  |       Version:  1.0   
        Resolution:  invalid        |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by mtredinnick):

  * status:  reopened => closed
  * resolution:  => invalid

Comment:

 The suggested change isn't correct. All successive `filter()` calls are
 combined with "AND", no matter what fields care involved. You can see this
 from looking at the generated SQL.

 Perhaps you are being confused by the fact that successive filters against
 multi-valued tables use separate copies of the table each time? The very
 section you refer to in the documentation explains exactly that. The
 filters are all combined simultaneously to the object being filtered (that
 is, they are "AND"-ed together) and only objects that meet all filter()
 criteria are in the final result set.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10623#comment:4>
Django <http://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