title: How can order by FIELD in Symfony2 with doctrine
body: <p>Hello I worked with Symfony2 and Doctrine.</p>
  
  <p>I want to order by my custom order with doctrine</p>
  
  <pre><code>SELECT id_product, pro_name FROM product ORDER BY FIELD(id_product,3,5,2)
  </code></pre>
  
  <p>I have tried
      </p>
  
  <pre><code>    $rang_1=array(3,5,2);
      $products = $em-&gt;getRepository('CompanyMyBundle:Product')-&gt;findBy(array('public' =&gt; 1,'idProduct'=&gt;$rang_1), array('idProduct'=&gt;$rang_1), 5);
  </code></pre>
  
  <p>AND
  </p>
  
  <pre><code>$sql = $em-&gt;createQuery("SELECT p FROM CompanyMyBundle:Product p WHERE l.public = 1 AND l.idProduct IN (".implode(',',$rang_1).")  ORDER BY FIELD(l.idProduct,".implode(',',$rang_1).")")-&gt;setMaxResults(5);
  </code></pre>
  
  <p>Any suggestion?</p>