From 51f957bcba14dfccfd222d1ef390e662f770f54d Mon Sep 17 00:00:00 2001 From: gnat Date: Tue, 1 Jul 2008 05:57:19 +0000 Subject: [PATCH] set a limit on fetchOne queries --- lib/Doctrine/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/Query.php b/lib/Doctrine/Query.php index d7367656a..4413cade4 100755 --- a/lib/Doctrine/Query.php +++ b/lib/Doctrine/Query.php @@ -157,7 +157,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract */ public function fetchOne($params = array(), $hydrationMode = null) { - $collection = $this->execute($params, $hydrationMode); + $collection = $this->limit(1)->execute($params, $hydrationMode); if (count($collection) === 0) { return false;