﻿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
1801	QuerySet.__and__ does not work for joined queries	mir@…	nobody	"Try
{{{
# Who has written a and a2?
Reporter.objects.filter(article__id__exact=a1.id) & Reporter.objects.filter(article__id__exact=a2.id)
}}}

... this does not work as expected. I've added a patch for the or tests that should make it easy for you to verify this bug.

The underlying problem is that you cannot simply lump together the where conditions in this case. This does only work as long as you don't have joins. Probably using UNION would fix this, but is the overhead tolerable? "	defect	closed	Database layer (models, ORM)	dev	major	fixed	qs-rf-fixed	mattimustang@… yannvr@…	Accepted	0	0	0	0	0	0
