is there any option to set alias for $qb->expr()->avg('e.value') in select() method of Doctrine2 query builder?
I have e.g. this query:
$qb->select($qb->expr()->avg('e.value'), 'e someAlias')->from('Entity', 'e');
But the average value is indexed by integer in the result, like this:
array(
0 => array(
'someAlias' => Entity {},
1 => 2.5255,
),
);
Is it possible to change key of the average value to the defined string value?