I'm using Doctrine2 for a project that might get a lot of traffic and I'm welling to do some pagination in a search page and that only fetch 5 results per page So is there a good way for doing this without the need to use the doctrine extension and keeping the ORM abstraction layer? I mean I don't want to write any form of dql queries and keep my code in this format:
$repo= $this->getDoctrine()
->getEntityManager()
->getRepository('AcmeOfficeBundle:Project');
$list=$repo->findBy(array('PROJ_private' => "0"));