title: Doctrine DQL dynamic ORDER BY parameter
body: <p>Im trying to pass the ORDER BY column as a parameter in DQL, like below:</p>
  
  <pre><code>$this-&gt;em-&gt;createQuery("SELECT t FROM Entities\Topic t ORDER BY :order")
       -&gt;setParameters( array('order' =&gt; 't.name') )-&gt;getResult();
  </code></pre>
  
  <p>I guess it doesn't work because setParameter will escape :order, however the below solution doesn't seem very good:</p>
  
  <pre><code>$order = 't.name'; // Dynamic value
  $this-&gt;em-&gt;createQuery("SELECT t FROM Entities\Topic t ORDER BY $order")
       -&gt;getResult();
  </code></pre>
  
  <p>Is there a better way to solve this?</p>