On Friday 08 August 2014 10:41:20 Anssi Kääriäinen wrote: > > As for addition of .exists lookup - how > should .filter(somefield__exists=False, somefield__othercol=2) work?
It should be noted that __exists is a little special. For the False case above, .filter(somefield__exists=False, somefield__othercol=2) should always get an empty result set, and for the True case, somefield__othercol=2 already implies somefield__exists=True. So while it would be really nice to have sane behavior there, it is not much of a real problem in practice. That being said, I suspect adding another level does have the problem Anssi mentions: .filter(a__b__exists=False, a__c=6) should still use only one join for a. Shai. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/201408130438.38620.shai%40platonix.com. For more options, visit https://groups.google.com/d/optout.
