Docs Menu
Docs Home
/
Relational Migrator
/ /

Embedded Array

On this page

  • About this Task
  • Behavior
  • Example

The Embedded array mapping rule is an advanced mapping rule option. It must be explicitly added to a mapping model.

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.

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.

This section demonstrates the relational input and the MongoDB output of the Embedded array mapping rule.

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:

← New Documents