Relations

April 17, 2019 ยท View on GitHub

Collections can refer to each other by using the other collection's name as the attribute.type configuration property, either as a scalar value or an array, for one-to-one or one-to-many relationship.

collections:
  users:
    attributes:
      friends:
        type: users[]
      manager:
        type: users

Models can nest themselves, i.e. be recursive.

Nested attributes are using the id attribute of the collection they refer to.

Nested collections can be deeply populated, modified and deleted by client.