class GroupMember(db.Model):
    group = db.ReferenceProperty(Group, collection_name='groupMembers')
user = db.ReferenceProperty(User, collection_name='groupMembers')
Filtering models with ReferenceProperties