我想知道一个脏道具的“干净”价值是在一个预先保存的猫鼬钩子中,如下所示:
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()
}
是否可以在不查找数据库的情况下查找旧值?