I have found 3 ways so far
1.
Model.on('attached',function(){
Model.create = function(data, callback){
...
}
});
2. a before save hook, using context instance
Model.observe('before save', function doSth(ctx, next) {
var model = ctx.instance;
if (model) {...
3. Disable the post remote method and add a new one :
Model.disableRemoteMethod('create', true);
--
Model.remoteMethod(
'myNewPost',
{
...,
http: {path: '/', verb: 'post'},
}
);
I prefer solutions 1/2 in terms of readability/redundancy but maybe 3 is better for performance ?