I'm implementing a trading system which has function like user A can
transfer some money to user B. In RMDB, I would put a transaction so
that the balance for user A and user B both changed or neither
changed.  Since the transfer can happen between any of two users, I
cannot image how to define entity group to make transaction work in
this case. So my question is:
1. Do I need a transaction here? If needed, how to define entity group
to make it work?
2. I have an implementation without using db.run_in_transaction listed
below, is this going to work without meeting transaction issues?

accounts = Account.get_key_by_name([key_name_a, key_name_b])
a, b = accounts
a.balance -= money
b.balance += money
db.put(accounts)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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