﻿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
14163	Setting pk should set the related fields also in the base chain.	Anssi Kääriäinen	nobody	"Consider two models:

{{{
class A(models.Model):
    pass

class B(A):
    a = models.OneToOneField(A, parent_link=True, primary_key=True)
}}}

creating an b instance and setting its pk should also set the a.id:
{{{
>>> b = B(pk=1)
>>> b.pk
1
>>> b.a_id
1
>>> b.id
1
}}}

At the moment we will get:
{{{
>>> b.id is None
True
}}}

It would be even better if setting b.id would also set b.a_id, but that is harder to do, and maybe it isn't that important.


"		closed	Database layer (models, ORM)	1.2		wontfix	Inheritance, parent_link, OneToOneField		Unreviewed	1	0	0	0	0	0
