I\'m using this:
$this->getDoctrine()->getRepository(\'MyBundle:MyEntity\')->findAll(array(), Query::HYDRATE_ARRAY);
I thought that sh
You can also use the getArrayResult() function instead of getResult(). It returns an array of data instead:
getArrayResult()
getResult()
$query = $em->createQuery("SELECT test FROM namespaceTestBundle:Test test"); $tests = $query->getArrayResult();