From bc28d91b401ae968c31ee30f4e1efe974b6cf7b5 Mon Sep 17 00:00:00 2001 From: nate Date: Sun, 21 Oct 2007 03:32:23 +0000 Subject: [PATCH] Changing Model::hasAny() to not query associations (Ticket #2816) git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5825 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index ff037447d..1d19f9a22 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -1405,7 +1405,7 @@ class Model extends Overloadable { * @return boolean True if such a record exists */ function hasAny($conditions = null) { - return ($this->findCount($conditions) != false); + return ($this->findCount($conditions, -1) != false); } /** * Return a single row as a resultset array.