findOneAndReplace should not require functions to exist on the replacement document #10714
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Model.findOneAndReplace
requires functions to exist on the replacement document. This is basically the same as #10144 except for the method name.If the current behavior is a bug, please provide the steps to reproduce.
Copy the example from #10144 and add
await UserModel.findOneAndReplace({ someProp: "hello" }, { someProp: "hi" });
after theUserModel.insertMany
call.package.json
tsconfig.json
index.ts
What is the expected behavior?
It should not require functions to exist on the replacement document.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js 14.17.0
Mongoose 5.13.9
MongoDB 5.0.2
The text was updated successfully, but these errors were encountered: