从关联的模型中删除

I've 2 models: Photo and Score. Each Photo has a Score. Photo is connect to Score by $hasOne = array('Score').

I want to delete photo score, when the photo is deleted.

How to do it in Cake?

(Note: I use deleteAll for delete photos)

You should set the association as dependent. See http://book.cakephp.org/view/1043/hasMany.