﻿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
15345	Model inheritance: wrong action of child_class_instance.delete()	truongsinh	nobody	"#
#myapp.models
class Place(models.Model):
    description = models.TextField()
    def __unicode__(self):
        return self.description
    def reload(self):
        self = Place.objects.get(id = self.id)

class Restaurant(Place):
    name = models.TextField()

#console
from myapp.models import *
p1 = Place.object.create(description = ""description1"")
r1 = Restaurant.object.create(id = p1.id, description = p1.description, name =name)
r1.delete()
r1 = Restaurant.objects.get(id = r1.id)
# return expected error
p1 = Place.objects.get(id = p1.id)
# return unexpected error, possible because that row is also deleted"		closed	Database layer (models, ORM)	1.2		invalid			Unreviewed	0	0	0	0	0	0
