title: Right Join in Doctrine2 for Symfony2
body: <p>I have the following working MySQL query:</p>
  
  <pre><code>SELECT *
  FROM bogenantworten a
      RIGHT JOIN
          bogenfragen f ON f.id = a.bogenfragen_id
          AND a.personen_id = 3,
      BogenTyp t, 
      BogenFragenGruppe g
  WHERE
      t.id = f.fragentyp_id AND
      g.id = f.fragengruppen_id AND
      t.id = 1
  ORDER BY f.sortierung ASC
  </code></pre>
  
  <p>Now I need this in Doctrine2 DQL or QueryBuilder. I already learned that D2 is forcing me to think in objects, but I couldn't find any advice how to tag my entities to make this work.</p>
  
  <p>So I'd like to either have the above MySQL query working in my Symfony2 app or some help how to annotate my entities right so I have a working right join connection between BogenAntworten and BogenFragen (the 3 and the 1 are parameters, just so you know). I already set the OneToMany and ManyToOne annotations for all my entities, but I need something to make a right/left join working.</p>
  
  <p>If you want to help me with my entity design:</p>
  
  <p>I have persons (table Person) who answers (table BogenAntworten) questions (table BogenFragen), and when I show the list of questions I either get the last answer from that question (need UPDATE when saving) or there is none and I have to create it (INSERT when saving). Questions also are in one of many types (table BogenTyp) and are in one of many groups (table BogenFragenGruppe)</p>
  
  <p>Any Ideas?</p>