sorting for doctrine2