unexpected warning : To create a new ObjectId please try Mongoose.Types.ObjectId
instead of using Mongoose.Schema.ObjectId
.
#5587
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?
Report a bug
What is the current behavior?
The warning is shown even if we're not creating a new ObjectId
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Do not show the warning when it is not an explicit instance of new ObjectId
Please mention your node.js, mongoose and MongoDB version.
Node v8.2.1
Mongoose v4.11.8
MongoDB v3.2.7
The text was updated successfully, but these errors were encountered: