I have a complicated SQL function that I can't seem to write in DQL (Doctrine's Query Language). Unfortunately the only way to get a result set from raw SQL in Doctrine only produces a result set as an array. My view uses an object, which is easier to iterate though, plus I don't have to go into the code and change all the objects to arrays.
Is there a way in Doctrine or PHP to convert the array to an object result set?
I could do it manually with a for loop and a stdClass, but I was hoping there was something more robust. Perhaps it can be done in Doctrine, but I can't find anywhere in the API a way to get the result set as an object except by using DQL ,which is terrible for nested queries.