I'd like to compare the new/incoming value of a property with the previous value of that property (what is currently saved in the db) within a pre('save')
middleware.
Does Mongoose provide a facility for doing this?
See Question&Answers more detail:os