Skip to content
This repository
Browse code

setting recursive to -1

  • Loading branch information...
commit c02912261bc23b956b195edacc362ff0b1b23c5d 1 parent 74a84c9
Carl Sutton authored February 23, 2012
3  lib/Cake/Model/Behavior/TreeBehavior.php
@@ -119,7 +119,8 @@ public function beforeDelete($Model, $cascade = true) {
119 119
 		extract($this->settings[$Model->alias]);
120 120
 		$data = current($Model->find('first', array(
121 121
 			'conditions' => array($Model->alias . '.' . $Model->primaryKey => $Model->id), 
122  
-			'fields' => array($Model->alias . '.' . $left, $Model->alias . '.' . $right))));
  122
+			'fields' => array($Model->alias . '.' . $left, $Model->alias . '.' . $right),
  123
+			'recursive' => -1)));
123 124
 
124 125
 		if (!$data[$right] || !$data[$left]) {
125 126
 			return true;

0 notes on commit c029122

Please sign in to comment.
Something went wrong with that request. Please try again.