我正在嘗試查詢EmbeddedDocumentFieldList字段中的某些內(nèi)容,并且想在條件中使用或操作。架構(gòu)為自爆:class EmbeddedDoc(EmbeddedDocument): name = StringField()class ParentDoc(Document): name = StringField(): children = EmbeddedDocumentFieldList(EmbeddedDoc)然后我想獲取ParentDoc的名為“ a”或“ b”的子對象,我嘗試使用Q函數(shù),但是程序拋出了一個異常,說“過濾器方法采用1個參數(shù),但給出2個”。還有其他方式嗎?謝謝
添加回答
舉報
0/150
提交
取消