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 –