作成しようとするとエラーとなる。
File "C:\Program Files\Google\google_appengine\google\appengine\api\datastore.py",
line 1386, in RunInTransaction'Nested transactions are not supported.')
BadRequestError: Nested transactions are not supported.
2.動作確認
First up is batch writes. You can now include entities in different entity groups in a single db.put() or db.delete() call. Entity modifications are only atomic within each entity group, but a single call that spans entity groups will be more efficient than a call for each group, which was required before.
以下は SDK だと Cannot operate on different entity groups in a transaction:
となるが Cloud では動作した。
class Dummy2(db.Model):
d1 = db.StringProperty()
class Dummy(db.Model):
d1 = db.StringProperty()
def tran():
d2 = Dummy2(d1 = "aaab")
d1 = Dummy(d1 = "aaab")
d1.put()
d2.put()
tran()
3. その他
トランザクションの中で検索は実行できない。
Can't query inside a transaction