我对 App Engine Datastore 非常陌生,我无法弄清楚这一点。我有这些模型:
class SomeUser(User):
name = db.StringProperty()
class Group(db.Model):
title = db.StringProperty()
date_started = db.DateTimeProperty(auto_now_add=True)
class GroupParticipant(db.Model):
group = db.ReferenceProperty(Group, collection_name = 'participants')
participant = db.ReferenceProperty(SomeUser)
is_owner = db.BooleanProperty()
如何查询数据存储以获得如下结果:
Group.title, Group_owner, Number of participants/Group
group1, someuser1, 3
group2, someuser2, 4