﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2091	IN field lookup returns all objects without filtering by the supplied list when used on ManyToMany field.	real dot human at mrmachine dot net	nobody	"using an IN field lookup in a filter on a ManyToMany field seems to return all objects. as far as i know, the two e.filter statements below should return the same queryset.

{{{
>>> e = Entry.objects.all()
>>> e
[<Entry: smooth sailing>, <Entry: wii rocks e3>, <Entry: 30thirty reboot>]

>>> t = Tag.objects.get(id=6)
>>> t
<Tag: django>

>>> t.entry_set.all()
[<Entry: smooth sailing>, <Entry: 30thirty reboot>]

>>> e.filter(tags__id__exact=6)
[<Entry: smooth sailing>, <Entry: 30thirty reboot>]

>>> e.filter(tags__id__in=[6])
[<Entry: smooth sailing>, <Entry: wii rocks e3>, <Entry: 30thirty reboot>]
}}}
"	defect	closed	Database layer (models, ORM)	dev	normal	fixed	in field lookup filter manytomany m2m many, qs-rf-fixed	gabor@… freakboy3742@… real.human@…	Accepted	0	0	0	0	0	0
