﻿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
2080	OR lookup across many-to-one relationships gives unexpected results	Antti Kaihola	Adrian Holovaty	"If
 * model {{{B}}} has a foreign key on model {{{A}}},
 * there is an {{{a1 = A(field1=value1)}}} object but no related {{{B}}} objects
and you do

{{{
A.objects.filter(Q(field1=value1) | Q(b__field2=value2))
}}}

the result will fail to include {{{a1}}}.

This is quite unexpected in my opinion, and I think the reason is that the resulting SQL query uses an inner join instead of an outer join."	defect	closed	Database layer (models, ORM)		normal	duplicate		mir@… mattimustang@… yannvr@…	Unreviewed	0	0	0	0	0	0
