0

I know we can make a resource embeddable in another resource, however below schema does not seems to be working? what is the right way to make an array of resources embeddable in another resource?

outer = {
   'type': 'dict',
   'schema': {
       'inner': {
           'type': 'list',
            'schema': {
                'type': 'objectid',
                'required': True,
                'data_relation': {
                    'resource': 'other_resources',
                    'embeddable': True,
            },
        },
    },
   }
}
PersianGulf
  • 2,845
  • 6
  • 47
  • 67
John
  • 2,107
  • 3
  • 22
  • 39

1 Answers1

0

Currently not supported:

Currenly we only support a single layer of embedding, i.e. /emails?embedded={"author": 1} but not /emails?embedded={"author.friends": 1}.

However, there's an active pull request right now (Add support for two layers of document embedding) which tries to address this limitation.

Nicola Iarocci
  • 6,606
  • 1
  • 20
  • 33