You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
bug
What is the current behavior?
When using a discriminator child model with the third argument (the optional key), it is then not possible to do a parent.insertMany with discriminator value set to the same as the optional key. It will instead create the document against the parent schema only, dropping the other properties.
If the current behavior is a bug, please provide the steps to reproduce.
Consider that kind is a discriminator key. The kind will not be respected when having set 'child' as the optional key.
What is the expected behavior?
For the child schema properties/values to be inserted into the created document(s)
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Moongose 5.5.2
Mongodb 3.6.3
Node.js 10.13.0
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
bug
What is the current behavior?
When using a discriminator child model with the third argument (the optional key), it is then not possible to do a parent.insertMany with discriminator value set to the same as the optional key. It will instead create the document against the parent schema only, dropping the other properties.
If the current behavior is a bug, please provide the steps to reproduce.
Consider that kind is a discriminator key. The kind will not be respected when having set 'child' as the optional key.
What is the expected behavior?
For the child schema properties/values to be inserted into the created document(s)
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Moongose 5.5.2
Mongodb 3.6.3
Node.js 10.13.0
The text was updated successfully, but these errors were encountered: