'Querying across reverse relations and then another relation should
insert outer joins correctly so as not to exclude results.'

def test_reverse_relations(self):

    obj = OuterA.objects.create()
    self.assertQuerysetEqual(OuterA.objects.filter(inner__second=None), ['<OuterA:    OuterA    object>'])
    self.assertQuerysetEqual(OuterA.objects.filter(inner__second__data=None), ['<OuterA:    OuterA    object>'])
    inner_obj = Inner.objects.create(first=obj)
    self.assertQuerysetEqual(Inner.objects.filter(first__inner__second=None), ['<Inner:    Inner    object>'])
    objB = OuterB.objects.create(data='reverse')
    self.assertQuerysetEqual(OuterB.objects.filter(inner__isnull=False), [])
    Inner.objects.create(first=obj)
    self.assertQuerysetEqual(OuterB.objects.exclude(inner__isnull=False), ['<OuterB:    OuterB    object>'])
