﻿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
20127	Unify subquery generation in the ORM	Anssi Kääriäinen	nobody	"There are some different ways for doing subqueries in the ORM currently. Query.split_exclude(), subqueries in deletion, as_nested_sql() and SubqueryConstraint seem to do something similar. Sometimes there are duplicated code paths, sometimes upper layers do something the lower layers will repeat later on.

I think every instance where a subquery constrain is needed should use the SubqueryConstraint either directly, or through QuerySet.filter() or sql.Query.build_filter(). This will allow doing all the somewhat complicated setup in one place."	Cleanup/optimization	new	Database layer (models, ORM)	dev	Normal				Unreviewed	0	0	0	0	0	0
