On Wednesday 13 August 2014 09:55:33 Anssi Kääriäinen wrote: > > But, how about .filter(Q(somefield__exists=False) | > Q(somefield__othercol=2))? This one should return results only if there > are no somefield related instances at all, or if there are related > instances, then at least one of those instances must have othercol > value=2.
Right. > So, both filters must target the same join I don't see how this follows -- separate joins will each have the same set of related records. 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/201408140239.59637.shai%40platonix.com. For more options, visit https://groups.google.com/d/optout.
