Describes the various policies the datastore can follow for implicit transaction management. When
deciding which policy to use, keep the following in mind: The datastore will automatically retry
operations that fail due to concurrent updates to the same entity group if the operation is not
part of a transaction. The datastore will not retry operations that fail due to concurrent
updates to the same entity group if the operation is part of a transaction, and will instead
immediately throw a ConcurrentModificationException. If your application needs to perform
any sort of intelligent merging when concurrent attempts are made to update the same entity group
you probably want #AUTO, otherwise #NONE is probably acceptable.
See DatastoreService for a list of operations that perform implicit transaction
management.
If a current transaction exists, use it, otherwise create one. The transaction will be
committed before the method returns if the datastore operation completes successfully and
rolled back if the datastore operation does not complete successfully. No matter the type or
quantity of entities provided, only one transaction will be created. This means that if you
pass entities that belong to multiple entity groups into one of these methods and you have this
policy enabled, you will receive an exception because transactions do not function across
entity groups.
NONE
If a current transaction exists, use it, otherwise execute without a transaction.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eImplicitTransactionManagementPolicy\u003c/code\u003e defines how the datastore handles implicit transactions, which are transactions not explicitly defined by the user.\u003c/p\u003e\n"],["\u003cp\u003eThe datastore will automatically retry operations that fail due to concurrent updates outside of transactions, but will throw a \u003ccode\u003eConcurrentModificationException\u003c/code\u003e within a transaction.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAUTO\u003c/code\u003e policy uses an existing transaction if available, or creates a new one, but it will result in an exception if provided entities from multiple entity groups.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eNONE\u003c/code\u003e policy uses an existing transaction, if one is available, but otherwise will not use a transaction.\u003c/p\u003e\n"]]],[],null,[]]