Limit results Doctrine 2 ORM


Description
Set the limit of the results returned by the query


$query = $this->getEntityManager()->createQuery( "SELECT * FROM Bug" );

$query->setMaxResults( $number );

$result = $query->getResult();
SEE ALSO