In CakePHP I have a model Type and SpecificType.
SpecificType belongTo a Type. (type_id field)
When I delete an entry of SpecificType, how can I also delet
I don't think you can delete Type with SpecificType cascade. you can only use cascade if there's hasMany or HABTM relation.
it is said in the manual.
Deletes the record identified by $id. By default, also deletes records dependent on the record specified to be deleted.
For example, when deleting a User record that is tied to many Recipe records (User 'hasMany' or 'hasAndBelongsToMany' Recipes):
* if $cascade is set to true, the related Recipe records are alsodeleted if the models dependent-value is set to true. * if $cascade is set to false, the Recipe records will remain after the User has been deleted.
you can always run
$this->del($id, true);
to remove your Type with related SpecificType-s.