有两份MongoEngine文件:
class A(Document):
a = StringField()
class B(Document):
b = StringField()
boolfield = BooleanField(default=False)
ref = ReferenceField(A)
我希望首先对特定的a对象执行filter()
,然后,在第一个查询中,filter()
在布尔字段上。但这些线会导致错误:
错误是:
TypeError: 'Collection' object is not callable. If you meant to call the '__deepcopy__' method on a 'Collection' object it is failing because no such method exists.
在这里查看完整的代码和回溯:https://gist.github.com/nferrari/4962245
谢谢!在
在0.7.8中,查询引用字段似乎不能链接起来,所以暂时请使用字典,然后作为工作循环传入,例如:
我添加了:https://github.com/MongoEngine/mongoengine/issues/234将在0.8中修复
相关问题 更多 >
编程相关推荐