Reputation: 1903
How can I use Objectify to retrieve the entity group's metadata, specifically the __version__
property?
I would like to use the __version__
property to determine whether a transaction should retry. That's because "it is possible to receive a DatastoreTimeoutException
or DatastoreFailureException
even when a transaction has been committed and will eventually be applied successfully."
Upvotes: 0
Views: 71
Reputation: 13556
There is nothing special in Objectify to manage this field, but if you create a field like this it should get populated with the version number:
@IgnoreSave long __version__;
That's two underscores on each side.
Upvotes: 1