阅读背景:

Strongloop:在保存之前将旧模型与操作钩子中的新实例进行比较

来源:互联网 

I implemented a "before save" operation hook in my code to compare the new instance about to be saved with the old one already in the database. For that, I compare the value given in the ctx.data with the one given by a query in the database. The problem is the returned values are always similar, as if the new instance has already been saved in the database. Have I totally missed the point of the "before save" hook, or is there a way to compare the two values ?I implemented a "before save" operation hook in




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: