Merging fixes from [3908] for Ticket #1689

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3909 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-11-22 20:25:13 +00:00
parent b76c2179e1
commit 87af38c7dc

View file

@ -1159,6 +1159,8 @@ class Model extends Overloadable {
* @access protected
*/
function _deleteHasMany($id, $cascade) {
$records = array();
foreach($this->hasMany as $assoc => $data) {
if ($data['dependent'] === true && $cascade === true) {
$model =& $this->{$data['className']};
@ -1180,6 +1182,8 @@ class Model extends Overloadable {
* @access protected
*/
function _deleteHasOne($id, $cascade) {
$records = array();
foreach($this->hasOne as $assoc => $data) {
if ($data['dependent'] === true && $cascade === true) {
$model =& $this->{$data['className']};