0
我正在设计一个数据结构存储在Google数据存储中。谷歌数据存储建模
- 应用具有类别
- 分类具有其他性质
我想查询属于特定类别 所有应用程序我也想找一个总和的应用程序的数量在给定类别。
为了实现这个我设计了以下类。
application.py
from google.appengine.ext import ndb
from cfc.models.admin.applicationcategory import ApplicationCategory
class Application(ndb.model):
""" Application Model"""
name = ndb.StringProperty()
category = ApplicationCategory()
applicationcategory.py
from google.appengine.ext import ndb
class ApplicationCategory(ndb.model):
"""Models an application Category"""
name = ndb.StringProperty()
date_created = ndb.DateTimeProperty(auto_now_add=True)
我的问题是如何定义给出的查询,数据存储是最终一致?
阅读有关使用父母re:最终一致性。除了这个问题缺乏大量的信息给你的建议。 –