I've a login table which stores the user login details. Whenever a user changes the password, lastPasswordChange field should get updated with the date of the password change. Now I'm manually updateing the field with Date().
Is there any better way to do this in Sequelize. Node.js and Mysql DB
you can use beforeSave(instance, options) hook in your model, like: