Strike all that, I made a mistake which is very clear on the test case but wasn't so in the original code.
Philippe On 9 juin, 18:00, Philippe Raoult <philippe.rao...@gmail.com> wrote: > Hello all, > > I've been hunting for a bug in my generic search form and it boils > down to this: I (wrongly) expected chained filters to behave as if > they were AND'd and they sometimes behave as OR'd. That was a bit > puzzling for me since the documentation seems to indicate that AND > would be the logical connector. So have I misread the documentation or > am I on to something ? I have a testcase ready to post in ticket but > here's the executive summary: > > BlogPost.objects.filter(blogcomment__comment__endswith = "amazin", > blogcomment__comment__startswith = "cool") > > =/= > > BlogPost.objects.filter(blogcomment__comment__endswith = > "amazin").filter(blogcomment__comment__startswith = "cool") > > Best regards, > Philippe --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---