【发布时间】:2016-11-11 12:30:50
【问题描述】:
使用教程中的例子(http://python-eve.org/features#embedded-resource-serialization):
DOMAIN = {
'emails': {
'schema': {
'author': {
'type': 'objectid',
'data_relation': {
'resource': 'users',
'field': '_id',
'embeddable': True
},
},
'subject': {'type': 'string'},
'body': {'type': 'string'},
}
}
例如可以查询作者姓名“Nicola Iarocci”的电子邮件吗?我试过了
/emails?where={"author.name":"Nikola Iarocci"}&embbeded={"author":1}
但它不起作用。
如果文档是嵌入的,它可以工作,但如果它被声明为可嵌入的,则不能。
【问题讨论】:
标签: eve