Re: De Morgan's Law and QuerySet semantics

2016-02-13 Thread Lucas Wiman
h, Tim! - Lucas On Saturday, February 13, 2016 at 6:53:11 PM UTC-8, Vijay Khemlani wrote: > > assert test_obj not in TestObj.objects.filter(Q(m2ms__int_value=10) & > Q(m2ms__char_value='bar')) > > Why shouldn't test_obj be in that query result? test_obj has

De Morgan's Law and QuerySet semantics

2016-02-13 Thread Lucas Wiman
I'm working on the django-predicate library, which defines in-memory evaluation semantics for Q objects. The eventual goal is to precisely match the behavior of the ORM on the subset of supported lookup types. Yesterday, I noticed a bug in that library, where there was a mismatch with the behav