Re: ANDing together results from ManyToMany Field not working

2009-06-22 Thread Alex Gaynor
On Mon, Jun 22, 2009 at 3:04 PM, IanR wrote: > > I have a model with a ManyToManyField. I want to return all the > instances where this M2M field has specific instances of the table > that the M2M field points at. > > For example. Model.objects.filter(m2mfield__id=1,m2mfield__id=2), so > in the

ANDing together results from ManyToMany Field not working

2009-06-22 Thread IanR
I have a model with a ManyToManyField. I want to return all the instances where this M2M field has specific instances of the table that the M2M field points at. For example. Model.objects.filter(m2mfield__id=1,m2mfield__id=2), so in theory this would return results in which the objects with pri