I need to fetch all records in database as Array using findAll() in Doctrine, My Query is Something like this
findAll()
$result = $this->getDoctrine()
It's possible to use $query->getArrayResult() as a shortcut to $query->getResult(Query::HYDRATE_ARRAY)
$query->getArrayResult()
$query->getResult(Query::HYDRATE_ARRAY)
doctrine hydration modes