StrictModeError with embedded discriminator created with tiedValue argument #9108
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When using an embedded discriminator, schema validation seems to fail when using the
tiedValue
parameter when defining the discriminator.If the current behavior is a bug, please provide the steps to reproduce.
Results in error:
What is the expected behavior?
Should not throw, and should not need disabling strict mode. With the default strict setting of enabled, the update will just silently fail.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Mongoose 5.9.16
Note that without
tiedValue
it works properly as described here: #9093The text was updated successfully, but these errors were encountered: