title: Symfony 2 Doctrine find by ordered array of id
body: <p>I'm looking for a way to use <code>Doctrine</code> in <code>Symfony 2</code> to find items using an ordered array of id.</p>
  
  <p>I have a Card entity with id (primary key) and title.</p>
  
  <p>I have a ListCards entity with id (primary key) and a listCards (an array of ids encoded : <code>["16", "2", "84"]</code>)</p>
  
  <p>I first fetch the list and then I need to find cards with those ids in that order.</p>
  
  <p>I try something like :</p>
  
  <pre><code>$idsArray = ["16", "2", "84"];
  $cardRepository-&gt;findby($idsArray);
  </code></pre>
  
  <p><strong>but</strong> <code>Doctrine</code> fetch my cards in <code>ASC</code> order.</p>
  
  <p><code>ORDER BY FIEDS</code> sql method doesn't seem to be supported by doctrine.</p>
  
  <p>Is there any simple solution for that kind of sorting ?</p>
  
  <p>Thank you (and sorry for my bad english).</p>