How to get Array Results in findAll() - Doctrine?

后端 未结 4 2008
梦如初夏
梦如初夏 2021-01-18 03:53

I need to fetch all records in database as Array using findAll() in Doctrine, My Query is Something like this

$result = $this->getDoctrine()
         


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-18 04:33

    It's possible to use $query->getArrayResult() as a shortcut to $query->getResult(Query::HYDRATE_ARRAY)

    doctrine hydration modes

提交回复
热议问题