2021年3月29日星期一

mongoose suppressWarning option

I am getting the following warning in console and accordingly this is due to having a top level property as a 24 character hex string.

warn: mongoose: To create a new ObjectId please try `Mongoose.Types.ObjectId` instead of using `Mongoose.Schema.ObjectId`. Set the `suppressWarning` option if you're trying to create a hex char path in your schema.  

Where can I set suppressWarning option though?

https://stackoverflow.com/questions/66863865/mongoose-suppresswarning-option March 30, 2021 at 10:06AM

没有评论:

发表评论