References
Reference system between schemas, through a find you can merge data from other schemas.
Searching with Schema references
The reference documents resemble the following document:
$ref
The
$ref
field holds the name of the Schema where the referenced document resides.$id
The
$id
field contains the value of the_id
field in the referenced document.
Example
In this example we use the "Creators" schema as $ref
, looking for _id
2 in it.
To use the find base data, use $data
, it returns the base value. The $data
can only be used in the $id
field, for that, the $id
can be an object with $data
inside or just a string, starting with $data
We use an object reference system, so if you want to access an object, pass the path inside the string, for example:
Using the property $data
Last updated