Sequlize update () returned data problem?

my requirement is to return the updated data after updating the data

but sequlize only returns an array in update (), indicating the number of updates.
has to check and return it once after the update. Is there a way for sequlize to return updated data directly after update ()?

Jan.16,2022

you can first use findOne () to find the data to be updated, and then call the model.save () method to update. In this way, you can get the data before and after the update. If you want to ensure data consistency, add a transaction . You don't need to use the update () method.

Menu