Embedded Array
On this page
The Embedded array mapping rule is an advanced mapping rule option. It must be explicitly added to a mapping model.
About this Task
The Embedded array mapping rule is available if the relational table it is mapping from is on the many side of the foreign key relationship.
The table containing the primary key must also be mapped to a collection in the MongoDB model.
Behavior
Use the Embedded array mapping rule to insert the values of the child table as array elements under documents in the collection mapped to the parent table.
Example
This section demonstrates the relational input and the MongoDB output of the Embedded array mapping rule.
Embedded array
In this example:
An Embedded Array mapping rule is applied to the Customer table.
The Source table is set to Order.
The Prefix is set to (root).
The Field Name is set to orders.
Click the tabs below to see the input and output for this example: