Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は 2 つのモデルを持っています: PhotoとScore。それぞれPhotoにScore. Photoによってに接続さScoreれ$hasOne = array('Score')ます。
Photo
Score
$hasOne = array('Score')
写真が削除されたときに写真のスコアを削除したい。
Cakeでそれを行う方法は?
(注:deleteAll写真の削除に使用します)
deleteAll
関連付けを従属として設定する必要があります。http://book.cakephp.org/view/1043/hasManyを参照してください。