LearnBoost/mongoose — Issue #627: access model.update in schema method?
Author: gocoffeecup
Created: 2011-11-28 14:44:18+00:00
State: open

schema.methods.mySave = function(){
// dostuffhere
this.save()
}
schema.methods.myRemove = function(){
// dostuffhere
this.remove()
}
schema.methods.myUpdate = function(){
// dostuffhere
this.update()
}

first 2 work, but i can't access update within the schema method