使用 Python Eve Rest 和 Mongo 过滤嵌入文档

Filtering on embedded document with Python Eve Rest and Mongo

我想通过嵌入文档的 属性 过滤某些内容。但是我做不到。

http://localhost:5000/vehicle?embedded={"model.brand":1}&where={"model.brand":"5bf3f02e63da120b27dc74b1"}

有什么办法可以查询吗?我没有找到任何按子文档过滤的解决方案。

python eve 不支持此功能。

看看这个 link:https://groups.google.com/d/msg/python-eve/O4e1GTS3jZs/HSZxcK85BAAJ

Nicola Iarocci 自己回答了这个问题,原因是 mongo 缺乏原生数据关系,这很难做到。