Closed TNT-Likely closed 9 years ago
use operation hooks instead. model hooks are deprecated.
@Neil-UWA it work,but how i can set some attribute?
this.xx='' not work
Model.beforeUpdate = function(next, modelInstance){
modelInstance.xxx = '';
next();
}
You can still use model hooks, but they are not recommended since they are deprecated. I suggest you to migrate from model hooks to operation hooks.
use operation hooks instead. model hooks are deprecated.
This is correct. See https://docs.strongloop.com/display/public/LB/Operation+hooks
model hooks beforeUpdate not work
hope somebody can help me ,thanks.