﻿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
4849	Nested Filters	ben.stookey@…	Adrian Holovaty	"After review in #django I decided to post this as a bug.

3 and 4 should have the same output, shouldn't they?

{{{
>>> Article.objects.filter(tags=t1)   #1
[<Article: A1>, <Article: A2>]
>>> Article.objects.filter(tags=t2)   #2
[<Article: A1>]
>>> Article.objects.filter(tags=t1).filter(tags=t2)   #3
[]
>>> Article.objects.filter(tags=t1, tags=t2)   #4
[<Article: A1>]
}}}

Although 4 works, the syntax doesn't allow for someone working with a list of tags.

Here are the models:

{{{
class Tag(models.Model):
	name = models.CharField(maxlength=32, unique=True)

class Article(models.Model):
	title = models.CharField(maxlength=255)
	tags = models.ManyToManyField(Tag)
}}}"		closed	Database layer (models, ORM)	dev		duplicate	filter, foreignkey		Accepted	0	0	0	0	0	0
