title: createQueryBuilder leftJoin using Doctrine and Symfony2
body: <p>This code doesn't work. Can anybody help me? The code is:</p>
  
  <pre><code>class ResultRepository extends EntityRepository
  {
       public function findAllByUserResultVote($id_vote)
       {
          $query = $this-&gt;createQueryBuilder('r')
             //associating tables...
             -&gt;leftJoin('r.user' , 'u')
             -&gt;leftJoin('r.answer' , 'a')
             -&gt;leftJoin('r.vote' , 'v')
  
             //Where idVote (Table result) == id (Table vote)
             -&gt;where('r.idVote = :idVote')
             -&gt;setParameter('idVote', $id_vote)
             -&gt;getQuery();
          return $query-&gt;getResult();
       }
  }
  </code></pre>
  
  <p>I have an entity User, Answer, Vote, Result.<br><br></p>
  
  <p>And I have 4 tables:
  User: id (primary), name, ...<br>
  Vote: id (primary), question, ...<br>
  Answer: id (primary), idVote, answer ...<br>
  Result: id (primary), idUser (id table user), idVote (id table vote), idAnswer (id table answer), ...</p>
  
  <p>-----<strong>Edit</strong>----<br>
  Thanks for the answer, but that is not what I do.<br>
  Result also is a table. And this only contains id and I need return for example:<br>
  <strong>Instead of:</strong> 1, 6, 5, 3<br>
  <strong>This:</strong> 1, u.name, v.question, a.answer</p>