I want to do fetchAll () with a limit? Do you know if this is possible with the symfony2 entity manager?
My current code (Fetch all, no limit):
$repository = $this->getDoctrine()->getRepository('MyBundle:Download'); $product = $repository->findAll();
Thanks to everyone. Best wishes,
EDIT:
$em = $this->getDoctrine()->getRepository('MyBundle:Download'); $ouput = $em->findBy(array(), array('id' => 'DESC'),5);
Return the last 5 lines.
Thanks to everyone.
symfony entitymanager doctrine2
Dimitri
source share