我有这些模型:
class Country(db.Model):
name = db.StringProperty()
code = db.StringProperty()
class Course(db.Model):
name = db.StringProperty()
description = db.StringProperty()
country = db.ReferenceProperty(Country, collection_name='courses')
class Application():
status = db.StringProperty()
course = db.ReferenceProperty(Course, collection_name='applications')
一个国家有许多课程,一门课程有许多应用。 那么我怎样才能得到一个国家所有申请的查询呢? 有可能吗?你知道吗
GAE数据存储不是关系模型。你不能做连接。您需要遍历每个课程以获得其应用程序。你知道吗
相关问题 更多 >
编程相关推荐