Open
Description
From looking at djangoappengine.db.compiler.SQLUpdateCompiler, it seems that an update reads a model entity from datastore a second time in order to save. That is, if I have a Django code like this:
my_entity = MyModel.objects.get(id=id) # reads from datastore
my_entity.my_field = 'something'
my_entity.save() # reads a second time, then writes to datastore
The first line of code obviously reads the model from the datastore. But based on the SQLUpdateCompiler.update_entity implementation, it looks like the model is read a second time, then updated with the changed values, and saved.
Am I understanding that correctly?
Metadata
Metadata
Assignees
Labels
No labels