通过ListField(ReferenceField)和parants id进行查询

时间:2015-06-01 03:33:47

标签: python mongoengine

我有这个型号:

class Group(BaseDocument):
    movies = ListField(ReferenceField('Movie'), required=False)
    season = IntField()

class Movie(MovieBase):
    season  = IntField() 
    episode = IntField() 

我想要电影那个季节是5而电影父母id(组)是parent_id,我该怎么做?

0 个答案:

没有答案