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')
我想删除照片分数,当照片被删除时。
如何在蛋糕中做到这一点?
(注:我deleteAll用于删除照片)
deleteAll
您应该将关联设置为依赖。见http://book.cakephp.org/view/1043/hasMany。