﻿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
1379	"get_relatedobject fails with  ForeignKey(""self"")"	ng@…	Adrian Holovaty	"When a model class has a one-to-many relationship with itself, the get_relatedobject methods of the many-side classes will be overwritten by the method of the one-side's class.

Example:

class Test(meta.Model):
    parent = meta.ForeignKey('self', blank=True, null=True)
    
Create two objects of that kind, set one to be the parent of the other, then try test.get_parent() on the child object. A UnitDoesNotExists exception will be raised.
"	defect	closed	Database layer (models, ORM)	0.91	major	fixed			Unreviewed	0	0	0	0	0	0
