0
我有一个模型供用户存储他们的书签。我应该创建一个字段来存储总数或在用户检索数据时对其进行聚合的最佳方式是什么?Google App Engine NDB keyproperty计数器
class UserBookMarks(Model):
class Meta:
behaviors = (searchable.Searchable,)
search_exclude=('created')
user= ndb.KeyProperty(kind=User, repeated=False)
items = ndb.KeyProperty(kind=ItemList, repeated=True)
created = ndb.DateTimeProperty(auto_now_add=True)
参考分片计数器上的文档:https://developers.google.com/appengine/articles/sharding_counters –