Closed el-lsan closed 8 years ago
+1
This is the normal cakephp behavior, it is not linked with the soft delete plugin. deleteAll
(whether it is soft or hard deletion) does not cascade to associations:
See http://api.cakephp.org/3.0/class-Cake.Datasource.RepositoryInterface.html#_deleteAll
This method will not execute on associations' cascade attribute. You should use database foreign keys + ON CASCADE rules if you need cascading deletes combined with this method.
The
deleteAll()
does not delete the associations however it is all fine with a single row deleting as we havecascadeDelete()
in_processDelete()
, but not indeleteAll()
.