I have model call "point", I want to update field "updated" on point in every action update. So, I make hook boforeUpdate to modify updated with new Date(). In result callback is true, and updated fied is a new datetime. But not updated on db, the field still old datetime. My code:
var app = require('../../../server.js'),
point = app.models.point;
point.beforeUpdate = function(next) {
var app = this;
app.updated = new Date();
next();
}