﻿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
7700	Query parent for child	casey@…	nobody	"I'm not sure if this is a feature request or a bug fix :) This seemed to work a few weeks ago, and it no longer does.  Whether or not the feature was intentional, it was quite useful--being able to query parent models for child instances.  Given the following model:

{{{
from django.contrib.auth.models import Group

class Team(Group):
    pass

}}}

I want to query the Groups to find out which are Teams.  This used to work
{{{
>>> g = Group.objects.create(name='group1')
>>> t = Team.objects.create(name='team1')
>>> Group.objects.filter(team__pk__isnull=False)
[<Group: team1>]
}}}

But instead now I get the following:
{{{
>>> Group.objects.filter(team__pk__isnull=False)
[<Group: group1>, <Group: team1>]
}}}

Ideally, it would be nice to simplify this to:
{{{
>>> Group.objects.filter(team__isnull=False)
[<Group: team1>]
}}}

But just getting it to work again would be nice."	Bug	closed	Core (Other)	dev	Normal	fixed		Vlastimil Zíma	Accepted	0	0	0	0	0	0
