title: CASTING attributes for Ordering on a Doctrine2 DQL Query
body: <p>I am trying to get <strong>Doctrine2 Entities</strong>, ordered by their ID which apparently is a String even though it contains only Numbers.
  So what I would like to do is something like this:</p>
  
  <pre><code>SELECT entity1, cast (entity1.id AS integer) AS orderId
  FROM Namespace\Bla\MyEntity 
  ORDER BY orderId
  </code></pre>
  
  <p>Is there a way to do something like this in <strong>Doctrine2</strong>?
  Or, what would be the best practise to get my Result if i can't change the type of the id (<em>due to customer requirements of course</em>)?</p>
  
  <hr>
  
  <p><strong>Attention</strong>: I am not asking SQL Code, i am asking for a Doctrine2 Solution, preferably in DQL</p>