1
0
mirror of synced 2024-12-13 06:46:03 +03:00

set a limit on fetchOne queries

This commit is contained in:
gnat 2008-07-01 05:57:19 +00:00
parent 872bb1acd5
commit 51f957bcba

View File

@ -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;