﻿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
29810	Left outer join using FilteredRelation failed on empty result	Dmitrii Azarenko	nobody	"When I try to join table with using `FilteredRelation` clause it failed if the result of a joined table is null.
This error can be reproduce by adding the following test case to the corresponding [https://github.com/django/django/blob/2.0/tests/filtered_relation/tests.py#L9 test module]:
{{{#!div style=""font-size: 80%""
tests.filtered_relation.tests.FilteredRelationTests:
  {{{#!python
def test_select_related_empty_join(self):
    self.assertFalse(
        Author.objects.annotate(
            empty_join=FilteredRelation('book', condition=Q(
                book__title='not existing book')),
        ).select_related('empty_join')
    )
}}}
}}}

This bug is typical since version 2.0 and exists until now."	Bug	new	Database layer (models, ORM)	2.0	Normal		ORM FilteredRelation		Unreviewed	0	0	0	0	0	0
