Getting the entity of each row from doctrine's repository of entity