title: Symfony - Using Outer Joins with Doctrine ORM
body: <p>I have three entities: <code>User</code>, <code>Answer</code>, and <code>Question</code>.</p>
  
  <p>There is a OneToMany relationship between <code>User</code> and <code>Answer</code> and a ManyToOne relationship between <code>Answer</code> and <code>Question</code>. Basically, a particular user optionally gives answers to a bunch of questions. </p>
  
  <p>What I'm trying to accomplish in the world of ORM is retrieving ALL questions and their associated answers for a particular user. The key part is that a user may not have answered a particular question but I still want to get that question (with a null answer).</p>
  
  <p>My <code>Answer</code> entity has a 'user' field which maps to the <code>User</code> entity which is inverted by an 'answers' field within the <code>User</code> entity. If I use this 'answers' field within the <code>User</code> entity, I only get the question/answer pairs for which the user has actually answered. I do not get questions for which the user has <em>not</em> answered.</p>
  
  <p>Typically, using raw SQL, this would involve a simple "left outer join" between my question and answer table, but I want this to be done using Doctrine's ORM. Any suggestions? I'm pretty new to the world of ORM.</p>