docsの StructuredProperty の例を次に示します。
class Address(ndb.Model):
type = ndb.StringProperty() # E.g., 'home', 'work'
street = ndb.StringProperty()
city = ndb.StringProperty()
class Contact(ndb.Model):
name = ndb.StringProperty()
addresses = ndb.StructuredProperty(Address, repeated=True)
guido = Contact(name='Guido',
addresses=[Address(type='home',
city='Amsterdam'),
Address(type='work',
street='Spear St',
city='SF')])
guido.put()
グイドが仕事で一時的にマリのトンブクトゥ市にいると想像してください。彼の職場の住所だけを取得して更新するにはどうすればよいですか?
ありがとう。