๐ Edit author's aliases array
We want to modify the MongoDB schema so that each author's aliases are represented as an array of strings.
We want to move from:
authorAliases: [
{
"authorId": 1,
"alias": "Quevedo"
}
]
to:
aliases: [
"Quevedo"
]
- On the MongoDB diagram view, click on the
authorscollection. - On the relational mappings list on the right, click on the edit icon of
author_aliasembedded array mapping rule. - rename the array
authorAliasesintoaliases. - In the list of fields, uncheck
authorId. - In the mapping rule's advanced settings, Check
create array of primitive values. - Click
Save and close.
