I am using sequelize.js library as ORM in node development. When update a row using sequelize, 'updated_at' field changed to current time-stamp. I would like to know how can I prevent this ? Without changing 'updated_at' field I would like to update other fields using sequlize API, not running raw query.
According to http://docs.sequelizejs.com/class/lib/model.js~Model.html#static-method-update you can use the "silent" option to run an update query but not update the updateAt field.
options.silent Boolean
optional
default: false
If true, the updatedAt timestamp will not be updated.
myModelInstance.update(values, {
silent: true
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With