0

我知道我们可以将资源嵌入到另一个资源中,但是下面的模式似乎不起作用?使一组资源可嵌入另一个资源的正确方法是什么?

outer = {
   'type': 'dict',
   'schema': {
       'inner': {
           'type': 'list',
            'schema': {
                'type': 'objectid',
                'required': True,
                'data_relation': {
                    'resource': 'other_resources',
                    'embeddable': True,
            },
        },
    },
   }
}
4

1 回答 1

0

目前不支持:

目前我们只支持单层嵌入,即/emails?embedded={"author": 1}不支持/emails?embedded={"author.friends": 1}

但是,现在有一个活动的拉取请求(添加对两层文档嵌入的支持)试图解决这个限制。

于 2014-03-10T16:33:03.747 回答