Changeset 4609 for trunk/lib/Doctrine

Show
Ignore:
Timestamp:
07/01/08 06:57:19 (6 months ago)
Author:
gnat
Message:

set a limit on fetchOne queries

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/Doctrine/Query.php

    r4452 r4609  
    158158    public function fetchOne($params = array(), $hydrationMode = null) 
    159159    { 
    160         $collection = $this->execute($params, $hydrationMode); 
     160        $collection = $this->limit(1)->execute($params, $hydrationMode); 
    161161 
    162162        if (count($collection) === 0) {