﻿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
1143	[patch] Incorrect joins in many to many kwarg queries	freakboy@…	Adrian Holovaty	"As a result of the lack of unit tests for many-to-many kwarg queries, the patch committed as r1792 introduced some backwards incompatibilities in the results returned by kwarg queries. Specifically, the join reuse behaviour of r1792 causes the join required for many-to-many intermediate table to be overwritten by the join required for the related table, resulting in an incorrect result set. This patch fixes this problem, and adds unit tests to prevent it from occurring again.

In addition, this patch adds the ability to form ""reverse"" many-to-many queries: i.e., kwarg queries starting on the class that does not contain the ManyToManyField. This was not previously possible, although the DB API docs imply that it should be. This feature is also unit tested.

This patch is provided against the magic-removal branch.
"	defect	closed	Database layer (models, ORM)		normal	fixed	magic-removal unit test failure		Unreviewed	1	0	0	0	0	0
