doc.isModified returns false whenever multiple fields are specified #13667
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Prerequisites
Mongoose version
6.11.4, 7.4.1
Node.js version
20.5.0
MongoDB server version
6.0.2
Typescript version (if applicable)
No response
Description
Hello!
It seems like
isModified
had a regression somewhat recently and is now returningfalse
whenever multiple paths are passed, even if one of those paths was modified. Not sure if I'm doing something wrong, but I was able to reproduce it on a fresh install of latest mongoose in an isolated repro script. I tested on the latest versions of 6.x and 7.x and the results are the same. I am upgrading from6.9.0
, where this repro script works as expected.As far as I can tell in the documentation, this is still a supported feature.
Thanks for your time,
Logan
Steps to Reproduce
Expected Behavior
The repro script should print
true
on every line, but theisModified multiple
line printsfalse
.The text was updated successfully, but these errors were encountered: