谷歌应用引擎python过滤器“属性的属性”

2024-04-26 04:36:19 发布

您现在位置:Python中文网/ 问答频道 /正文

在google app engine上安装这些模型:

class Choice(db.Model):
    poll = db.ReferenceProperty(Poll, collection_name = 'choices' )
    text = db.StringProperty()

class Vote(db.Model):
    choice = db.ReferenceProperty(Choice, collection_name = 'votes' )
    ip = db.StringProperty()
    date = db.DateTimeProperty(auto_now=1)

如何执行这个django查询?在

^{2}$

Tags: name模型appdbmodelgoogleengineclass
1条回答
网友
1楼 · 发布于 2024-04-26 04:36:19

appengine数据存储无法执行这样的查询,这需要一个join。要执行这样的查询,您需要对数据进行非规范化,以便您的投票实体包含有关它们应用于哪个投票的信息。在

相关问题 更多 >