From d485edd1ab7f39872369bb292b5012878d58d937 Mon Sep 17 00:00:00 2001 From: gwoo Date: Wed, 18 Oct 2006 01:07:09 +0000 Subject: [PATCH] adding fix for generate list to 1.2 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3703 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/model.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index aa31c55e5..a28f42fe1 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -1564,8 +1564,10 @@ class Model extends Overloadable { } else { $fields = null; } - - $result = $this->findAll($conditions, $fields, $order, $limit, 1, 0); + if($this->recursive >= 1) { + $this->recursive = -1; + } + $result = $this->findAll($conditions, $fields, $order, $limit); if ($keyPath == null) { $keyPath = '{n}.' . $this->name . '.' . $this->primaryKey;