我知道我们可以将资源嵌入到另一个资源中,但是下面的模式似乎不起作用?将一系列资源嵌入另一个资源的正确方法是什么?
outer = {
'type': 'dict',
'schema': {
'inner': {
'type': 'list',
'schema': {
'type': 'objectid',
'required': True,
'data_relation': {
'resource': 'other_resources',
'embeddable': True,
},
},
},
}
}
答案 0 :(得分:0)
目前不支持:
Currenly我们只支持单层嵌入,即
/emails?embedded={"author": 1}
但不支持/emails?embedded={"author.friends": 1}
。
但是,现在有一个主动拉取请求(Add support for two layers of document embedding)试图解决此限制。