From c02912261bc23b956b195edacc362ff0b1b23c5d Mon Sep 17 00:00:00 2001 From: dogmatic69 Date: Thu, 23 Feb 2012 11:36:44 +0000 Subject: [PATCH] setting recursive to -1 --- lib/Cake/Model/Behavior/TreeBehavior.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Model/Behavior/TreeBehavior.php b/lib/Cake/Model/Behavior/TreeBehavior.php index 53f1f2ad2..6dea16dc6 100644 --- a/lib/Cake/Model/Behavior/TreeBehavior.php +++ b/lib/Cake/Model/Behavior/TreeBehavior.php @@ -119,7 +119,8 @@ class TreeBehavior extends ModelBehavior { extract($this->settings[$Model->alias]); $data = current($Model->find('first', array( 'conditions' => array($Model->alias . '.' . $Model->primaryKey => $Model->id), - 'fields' => array($Model->alias . '.' . $left, $Model->alias . '.' . $right)))); + 'fields' => array($Model->alias . '.' . $left, $Model->alias . '.' . $right), + 'recursive' => -1))); if (!$data[$right] || !$data[$left]) { return true;