different entity group on transaction using google-cloud-ndb
问题 I would like to run a transaction operation in Google App Engine using google-cloud-ndb. I deployed this app. Here is my code. # -*- coding: utf-8 -*- from flask import Flask from google.cloud import ndb import time app = Flask(__name__) class Book(ndb.Model): hoge = ndb.IntegerProperty() class Book2(ndb.Model): hoge = ndb.IntegerProperty() @ndb.transactional() def test1(): ent = ndb.Key(Book, "a").get() print("after get: %s", ent) ent.hoge = ent.hoge + 1 ent.put() print("after put: %s", ent)