次のような保存前のマングースフックで、ダーティプロップの「クリーン」値が何であるかを知りたいです。
UserSchema.pre('save', function(next) {
var user = this;
if (user.isModified('password')){
//i want to know what the value of user.password was before it was changed
}
next()
}
データベースで検索せずに古い値を検索することは可能ですか?