-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I'm trying to save an object that was obtained by the function findOne using .select()after adding an element to an array field and it gives me the error in the title. This doesn't happen in version 5.8.7, but in 5.10.15 it started happening. I tested also in the latest version 5.11.15 and it still is happening.
If the current behavior is a bug, please provide the steps to reproduce.
https://gist.github.com/gask/cb1d3dfa25b31d3ef0a406a2a12724a0
What is the expected behavior?
Saving normally.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
NPM 6.12.0
Node 12.13.0
Mongoose 5.10.15 (tested also in 5.11.15)
MongoDB 4.4