﻿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
12567	Incorrect SQL being generated in certain inheritance cases.	Alex Gaynor	nobody	"Given the models

{{{
from django.db import models

class A(models.Model):
    pass

class B(A):
   pass

class C(A):
   pass
}}}

The query:
{{{
>>> A.objects.filter(b__isnull=False)
}}}

Generates bad SQL (specifically it omits the needed join).  Worth noting that:
{{{
>>> A.objects.exclude(b=None)
}}}

works correctly."	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed		Vlastimil Zíma	Accepted	1	0	0	1	0	0
