在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}$
appengine数据存储无法执行这样的查询,这需要一个join。要执行这样的查询,您需要对数据进行非规范化,以便您的投票实体包含有关它们应用于哪个投票的信息。在
相关问题 更多 >
编程相关推荐