Doctrine 1

Aggregates functions do not return proper values when using many relationships and limits