class User(UserMixin, ndb.Model):
email = ndb.StringProperty(required = True)
password_hash = ndb.TextProperty(required = True)
class Record(ndb.Model):
user = ndb.KeyProperty(kind=User)
notes = ndb.TextProperty()
Django では、古典的な GAE-db も次のようにユーザーに属するレコードを照会すると思います。
user = "get user instance"
user.record_set.all()
しかし、ndb では、このアプローチはエラーをスローします。 ドキュメントはこれに光を当てていません。
どうすればこれを達成できますか?ありがとう