If I passed a list of key ids as an argument in a transaction, would
the change associated with the first key in the list happen first? And
if not, how do I specify the order that I want the changes to happen
in?

As a concrete example, consider this code below from Google
Docshttp://code.google.com/appengine/docs/python/datastore/transactions.html---would
changes to the first item in acc.key() happen first?

class Accumulator(db.Model):
    counter = db.IntegerProperty()

Docshttp://code.google.com/appengine/docs/python/datastore/transactions.html:
def increment_counter(key, amount):
    obj = db.get(key)
    obj.counter += amount
    obj.put()

q = db.GqlQuery("SELECT * FROM Accumulator")
acc = q.get()
db.run_in_transaction(increment_counter, acc.key(), 5)



-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to