Skip to content

Commit

Permalink
fix(schema): add $embeddedSchemaType property to arrays for consist…
Browse files Browse the repository at this point in the history
…ency with document arrays

Fix #8389
  • Loading branch information
vkarpov15 committed Dec 12, 2019
1 parent 14e1c34 commit 2c2f98b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/schema/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ function SchemaArray(key, cast, options, schemaOptions) {
this.caster = caster;
}

this.$embeddedSchemaType = this.caster;

if (!(this.caster instanceof EmbeddedDoc)) {
this.caster.path = key;
}
Expand Down

0 comments on commit 2c2f98b

Please sign in to comment.