Re: Chaining ManyToMany Filters Update

2007-03-12 Thread Gerard Whittey
Boris Smus wrote: > On Mar 12, 6:56 am, Tim Chase <[EMAIL PROTECTED]> > wrote:> >> cs.filter( >> Q(default_recipe__ingredients__ingredient__id=3) | >> Q(default_recipe__ingredients__ingredient__id=1) >> ) > > Just to clarify, I was trying to get AND functionality, as Kon

Re: Chaining ManyToMany Filters Update

2007-03-12 Thread Boris Smus
On Mar 12, 6:56 am, Tim Chase <[EMAIL PROTECTED]> wrote:> > cs.filter( > Q(default_recipe__ingredients__ingredient__id=3) | > Q(default_recipe__ingredients__ingredient__id=1) > ) Just to clarify, I was trying to get AND functionality, as Konstantin suggested. I also tried

Re: Chaining ManyToMany Filters Update

2007-03-12 Thread Tim Chase
> > >[56]:cs.filter(default_recipe__ingredients__ingredient__id=3).filter(default_recipe__ingredients__ingredient__id=1) >> Out[56]:[] > This would map to a Query that looks like this "... WHERE id=3 AND > id=1". that would most certainly return no results. Unless those ingredients were qbits

Re: Chaining ManyToMany Filters Update

2007-03-12 Thread akonsu
Hello, please allow me to disagree. the first two queries in the original post return result sets which overlap. but they combined return the empty set. this is the problem. konstantin On Mar 12, 9:13 am, Atilla <[EMAIL PROTECTED]> wrote: > On 12/03/07, Boris Smus <[EMAIL PROTECTED]> wrote: >

Re: Chaining ManyToMany Filters Update

2007-03-12 Thread Atilla
On 12/03/07, Boris Smus <[EMAIL PROTECTED]> wrote: >[56]:cs.filter(default_recipe__ingredients__ingredient__id=3).filter(default_recipe__ingredients__ingredient__id=1) > Out[56]:[] This would map to a Query that looks like this "... WHERE id=3 AND id=1". that would most certainly return no resul