标题说明了一切。我有一个 Mongoose 文档,它有一个这样的实例方法:
Model.methods.destroy = function(callback) {
// blah blah
this.remove(callback);
}
我怎样才能告诉一个实例Model
删除自己?当我尝试this.remove
时,它告诉我
Uncaught TypeError: Object #<EventEmitter> has no method 'remove'
也this.constructor
没有remove
。