I am trying to get Doctrine2 Entities, ordered by their ID which apparently is a String even though it contains only Numbers. So what I would like to do is
Not sure if this works, but to access an entity ID you need the IDENTITY() DQL function. Try this:
SELECT entity1 FROM Namespace\Bla\MyEntity ORDER BY IDENTITY(entity1)