Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- someSchema.pre('save', function(next){
- asyncFunction(function(){
- this.sub.value = 'something'
- next()
- })
- })
- some.Schema.pre('save', function(next){
- asyncFunction(function(){
- next('something')
- });
- });
- some.Schema.pre('save', function(next, value){
- this.sub.value=value
- next()
- })
- someSchema.pre('save', function(next){
- x = this
- asyncFunction(function(){
- x.sub.value = 'something'
- next()
- })
- })
- someSchema.pre('save', function(next){
- var self = this;
- asyncFunction(function(){
- self.sub.value = 'something'
- next()
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement