-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Mongoose version
8.1.0
Node.js version
20.x
MongoDB server version
6.x
Typescript version (if applicable)
5.3.x
Description
The following code
await FooModel.updateOne(
{ foo: bar },
{ $set: {baz: true} },
{ setDefaultsOnInsert: true },
);Results in this type error
Object literal may only specify known properties, and 'setDefaultsOnInsert' does not exist in type 'UpdateOptions & Omit<MongooseQueryOptions<AwardFare>, "lean">'.
From what I can understand setDefaultsOnInsert hasn't been removed in the updated mongo driver version, and if it has this version of Mongoose should had been released as 9.0 and not 8.1.0.
This worked in 8.0.4
Steps to Reproduce
See description
Expected Behavior
No response
Metadata
Metadata
Assignees
Labels
No labels