fix(destroy): Properties updated in a beforeDestroy hook are now pers… #9319
…isted on soft delete. Closes #9318
Pull Request check-list
Please make sure to review and check all of these items:
Description of change
When getting the list of things to update in the database to perform a soft delete, the code is now considering changed values (through
Closes issue #9318
I was checking other use of this hook, we need to apply this change to
This change may be unexpected for some users and definitely change hook behaviour (#9318 (comment)) so its better to keep this in v5
@sushantdhiman Sorry, I'm puzzled
I'm thinking that the code should individually call
That would sum up to something like (pseudo-code):
Hey guys (and @sushantdhiman),
Can you share the status of this contribution? Do you need more code from me or can we consider it good to merge, eventually opening another issue to track the refactoring of the bulk 'destroy' operation?
For what it's worth, we're using this patch in production for several weeks now without any issue. It fits well with bonaval/sequelize-temporal#7 which I contributed too.