Closed gonenduk closed 8 years ago
It does seem worthwhile to add middleware support for the mongoose update
and findOneAndUpdate
functions. http://mongoosejs.com/docs/middleware.html The open pull request #27 seems to address this, and it looks like the one failing test suite execution in CI could be spurious.
And in PR #28, @rfink takes the changes from #27 and leaves a working fork that you can investigate: https://github.com/rfink/mongoose-timestamp/tree/mongoose-4.0
Merged #27 and published to npm as 0.5.0
Only works after save(). Was a mongoose limitation. Solved in mongoose 4. Please add support.