While working on https://github.com/mozilla-sensorweb/sensorthings/issues/228, it was discovered the delete hooks (beforeDelete, afterDelete) are not run during /DELETE requests. From the Sequelize documentation: "The only way to call beforeDestroy/afterDestroy hooks are on associations with onDelete: 'cascade' and the option hooks: true"
We should investigate whether using 'delete on cascade' when defining associations results in delete hooks being run during /DELETE requests.
While working on https://github.com/mozilla-sensorweb/sensorthings/issues/228, it was discovered the
delete
hooks (beforeDelete
,afterDelete
) are not run during/DELETE
requests. From the Sequelize documentation: "The only way to call beforeDestroy/afterDestroy hooks are on associations with onDelete: 'cascade' and the option hooks: true"We should investigate whether using 'delete on cascade' when defining associations results in
delete
hooks being run during/DELETE
requests.