title: Custom ORDER BY clause by values in Doctrine 2
body: <p>I am trying to use custom sorting in Doctrine 2 (using MySQL). Code looks somehow like this:</p>
  
  <pre><code>$queryBuilder-&gt;orderBy("i.type = 5, i.type = 3, i.type = 7");
  </code></pre>
  
  <p>The error I get is this one: <code>[Syntax Error] line 0, col 72: Error: Expected end of string, got '='</code>.</p>
  
  <p>I have found out that this is not possible because of compatibility with other database systems. So my questions is: How can do this in other way, directly in the query (if possible)?</p>