【发布时间】:2017-06-23 14:55:11
【问题描述】:
我想为单个架构使用多个预保存的 mongoose 中间件,这可能吗?
例子:
var schema = new Schema(..);
schema.pre('save', function(next) {
// do stuff
next();
});
schema.pre('save', function(next) {
// do another thing
next();
});
【问题讨论】: