Closed GoogleCodeExporter closed 9 years ago
Slim3 increments version automatically.
See line 938 of DatastoreUtil.java:
http://code.google.com/p/slim3/source/browse/trunk/slim3/src/main/java/org/slim3
/datastore/DatastoreUtil.java
Original comment by higaya...@gmail.com
on 23 Jan 2011 at 1:36
why would converting a model to an entity increment the version?
Is the version the optimistic locking version of the data or the
version of the schema data model for migration?
I'm confused. If it's the schema, then we should add a version number of the
actual
data to prevent two users from overwriting each other.
http://forum.springsource.org/showthread.php?t=17925
Original comment by m...@systemsplanet.com
on 23 Jan 2011 at 4:34
A version property is for optimistic locking, not for schema.
"modelToEntity" method is called before Datastore#put().
Original comment by higaya...@gmail.com
on 23 Jan 2011 at 5:12
so if the write fails, an app retry will increment
the version again?
Original comment by m...@systemsplanet.com
on 23 Jan 2011 at 2:44
If the write fails, an app does not need to increment the version again.
Because slim3 increments the version automatically when putting the entity.
Original comment by higaya...@gmail.com
on 23 Jan 2011 at 3:27
Original comment by higaya...@gmail.com
on 28 Feb 2011 at 3:35
Original issue reported on code.google.com by
m...@systemsplanet.com
on 22 Jan 2011 at 6:56