I'll look into this.
Anssi,Thanks for helping.I'm sorry to say that your answer went somewhat over my head, my proficiency with SQL is lacking.What I understood from your explanation:- A filter/exclude that traverses a 1:N relationship(such as foreign key) should target the same row with all of its criteria(kwargs).- Complex queries don't work correctly in exclude when using relationships in 1.5.x- Complex queries don't work correctly in exclude when using relationships in 1.6.xDid I understand correctly?
If that was the whole of the situation I would be ok, I can work around this issue with multiple exclude statements, such as:bees = B.objects.exclude(a__confirmation=False, a__state=1)bees = bees.exclude(a__confirmation__isnull=True, a__state=1)That should be equivalent to what I was trying to do with:confirm_q = Q(a__confirmation=False) | Q(a__confirmation__isnull=True)bees = B.objects.exclude(confirm_q, a__state=1)But my solution of splitting the Q into two queries didn't work, for either 1.5.5 or 1.6rc1.Did I miss something?
I was going to file a ticket in trac about this and found this one(https://code.djangoproject.com/ticket/21192) which seems related. The thing is that one was supposedly resolved 5 weeks ago, which would mean that fix would be in 1.6rc1...Should I reopen that ticket or file a new one?
--
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 django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
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/a901cb40-b80d-487e-b751-147471c94900%40googlegroups.com.
Adding something about this to release notes shouldn't hurt anybody.
--
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 django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
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/5a3a812e-9620-41ba-bd97-6b85baa253ef%40googlegroups.com.