﻿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
18305	force_update/force_insert not passed up the inheritance chain in .save()	Anssi Kääriäinen	nobody	"When saving a model, the force_update and force_insert are not passed up to parent model saves in model.save(). For example:
{{{
class Place(models.Model):
    name = TextField()

class Restaurant(Place):
    serves_pizza = models.BooleanField()

r = Restaurant.objects.create(name='Pizzeria pizza-kebab', serves_pizza=True)
r.serves_pizza = False
r.save(force_update=True)
}}}
Now, the r is updated correctly. Then, when saving the Place, the force_update isn't passed to the save_base, and thus the Place is first queried - so, the force_update isn't honored.

The same is true for force_insert. However, in this case it is possible that the force_insert is meant only for the Restaurant. You can currently do this:
{{{
p = Place.objects.create(name='p')
r = Restaurant(place=p, serves_pizza=False)
r.save(force_insert=True)
}}}
This would however be impossible if the force_insert would be passed up the inheritance chain.

Fixing the force_update case seems clear - however the force_insert case needs at least some consideration for backwards compatibility reasons."	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed			Accepted	0	0	0	0	0	0
