﻿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
19547	Queryset.__or__ and caching of known related instances breaking	Marc Tamlyn	Aymeric Augustin	"If you or together two querysets with known related instances then you can get some incorrect data:

If you do `instance_1.foo_set.all() | instance_2.foo_set.all()` then all of the foos will have `foo.instance == instance1` even though `foo.instance_id == instance2.pk`.

I have a failing test case and a partial fix on github at https://github.com/mjtamlyn/django/compare/known-related-objects-queryset-or

The fix does ensure data is integral but it doesn't have the full efficiency improvement. I'm also working on a fix which solves the efficiency as well but it doesn't feel ""right""..."	Bug	closed	Database layer (models, ORM)	1.5-beta-1	Release blocker	fixed			Accepted	1	0	0	0	0	0
