A temp solution I have is backing up the instance in another hook, but this seems to be limiting. Sequelize destroy hooks still retain the instance in memory so that hooks can use information on the newly deleted instance.
The use case here is pretty common, creating an event from the event. Another common use case would be calling a third party service, like S3 to delete related blob items.
Could we either 1) Remove that line 2) Move the instance to something like context.deletedInstance?
For DELETES, in this line https://github.com/tommybananas/finale/blob/master/lib/Controllers/delete.js#L23 the instance is removed from the context, which greatly limits what can be done in hooks after write.
A temp solution I have is backing up the instance in another hook, but this seems to be limiting. Sequelize destroy hooks still retain the instance in memory so that hooks can use information on the newly deleted instance.
The use case here is pretty common, creating an event from the event. Another common use case would be calling a third party service, like S3 to delete related blob items.
Could we either 1) Remove that line 2) Move the instance to something like
context.deletedInstance
?