﻿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
25991	A new implementation for exclude() queries	Anssi Kääriäinen	Eddy ADEGNANDJOU	"The idea is to prewalk the Q-object, split it into parts that need to go into a subquery, and then add the filtered subqueries into the main query.

This ticket deals with problems of doing `Author.objects.exclude(friends__age__gte=20, friends__age__lte=40)`. Currently this creates two joins to friends, so that any author with either a friend older than 20 or a friend younger than 40 is matched. The correct interpretation is that any author with a friend with age between 20 and 40 is matched."	Bug	assigned	Database layer (models, ORM)	dev	Normal			carsten.fuchs@… Ülgen Sarıkavak	Accepted	1	0	0	1	0	0
