Reputation: 27027
I store groups of entities in the google app engine Data Store with the same ancestor/parent/entityGroup. This is so that the entities can be updated in one atomic datastore transaction.
The problem is as follows:
When I remove the transaction, my code works perfectly, so it must be the transaction that is causing this strange behavior.
Should updates to entities in the entity group not be visible elsewhere in the same transaction?
PS: I am using Python. And GAE tells me I can't use nested transactions :(
Upvotes: 2
Views: 229
Reputation: 17624
App Engine's transactions are designed that way, ie reads within a transaction see a snapshot as of the beginning of the transaction, so they don't see the result of earlier writes within the transaction:
http://code.google.com/appengine/docs/python/datastore/transactions.html#Isolation_and_Consistency
Upvotes: 4
Reputation: 24472
Looks like you are not doing a commit on the transaction before querying
In a transaction, entities will not be persisted until the transaction is commited
Upvotes: 0