Python Eve - Query Embedded Data Relationship

I have the following resource:

item = { 'wrapper': { 'type': 'dict', 'schema': { 'element': { 'type': 'objectid', 'data_relation': { 'resource': 'code', 'field': '_id', 'embeddable': True, }, }, }, }, } 

When I try to execute a query using objectid, I get an empty list.

 http://127.0.0.1:5000/item?where={"wrapper.element":"5834987589b0dc353b72c27d"} 

5834987589b0dc353b72c27d is a valid _id for the item.

If I transfer data from an embedded document, I can request it as expected

Is there a way to do this with an inline data relation?

+7
python eve
source share
1 answer

I just tested with eve==0.7.1 and works as expected when filtering with ?where={"wrapper.element" : "<your_objectid>"} , as you said.

0
source share

All Articles