I am using the Doctrine findBy()
method, but I want to get arrays returned instead of objects. This is my query:
$results = $em
->getRepository('xBundle:x')
->findBy(
array(),
array('name' => 'ASC')
);
I did some research and found that HYDRATE_ARRAY
is the way to do it, but I have no idea how to include that in the findBy()
method.
EDIT My query as it is, is returning objects. I don't want to create any methods in my repository; I want to just edit the existing query so that it returns arrays.