title: SQL query with UNION in Doctrine Symfony
body: <p>I have a question about the translation of a SQL query in Doctrine Symfony. I would like to do a thing like that :</p>
  
  <pre><code>SELECT m.*
  FROM member m
  INNER JOIN (
    SELECT id_member
    FROM friend
    WHERE id_friend=99
    UNION
    SELECT id_friend
    FROM friend
    WHERE id_member=99
  ) a ON m.id=a.id_member 
  WHERE m.visible=1
  </code></pre>
  
  <p>In this example, i search all friends of the user 99.</p>
  
  <p><strong>My tables :</strong><br> </p>
  
  <blockquote>
    <p><strong>Member:</strong> (id, name, visible)<br>
    <strong>Friend:</strong> (id, id_member,
    id_friend, active)</p>
  </blockquote>
  
  <p>Precision : I would like to use the Symfony pager.</p>
  
  <p>A solution ? Thank you !</p>