With doctrine and the query builder I write a SELECT MAX() query, and when this result is passed to another query builder, as a parameter, the query works just fine.
But for some reason, I use native SQL query elsewhere in another Repository, and when I use $repo->getMaxMyThing(), it return me an array of array like
array(array('1' => 42)).
Not that if I want the result, I need to type: $max[0]['1'] (The 0 is a simple array index, but the '1' is a string associated key).
Did any method exists in the Doctrine Bundle to 'convert' it to a simple integer automatically?