Re: DB API - filter/exclude bug ?

2007-10-07 Thread Justin Bronn
> So my object ' de la tourelles>' can't appear in both queryset, right? Not necessarily. For example, if you had a Place ("Paris"), it may be associated with multiple users because of the ManyToManyField ("M2M"). In this case let's say Bob and Jane both have a M2M entries to Paris. When you

DB API - filter/exclude bug ?

2007-09-26 Thread gilles . bassiere
Hi folks! Is this possible ? In [2]: Place.objects.filter(usual_users__id=1) Out[2]: [, , ] In [3]: Place.objects.exclude(usual_users__id=1) Out[3]: [, ] AFAIU, exclude() generates an SQL clause like '... where not()' whereas filter() generates '... where '. So my object '' can't