我需要从所有文档中的 DictField(在本例中为“内容”)中删除特定列(在本例中为“Paper ID”)。对应的 mongo-shell 脚本是
db.list_input_file.update({},{$unset:{"content.Paper ID":1}}, false, true);
假设我的模型类名为 JListInputFile,我如何使用 MongoEngine 编写相同的内容。相同的文档不是很有帮助。
我需要从所有文档中的 DictField(在本例中为“内容”)中删除特定列(在本例中为“Paper ID”)。对应的 mongo-shell 脚本是
db.list_input_file.update({},{$unset:{"content.Paper ID":1}}, false, true);
假设我的模型类名为 JListInputFile,我如何使用 MongoEngine 编写相同的内容。相同的文档不是很有帮助。