title: How do I select specific fields in QueryBuilder with joins
body: <p>I'm using Symfony 2.7.7 with Doctrine 2. I have a query that joins four tables. In my twig file I only need to render three bits of information from the various tables. I want to select just those fields to hopefully optimize the query instead of returning everything.</p>
  
  <p>Here is my current code for the select:</p>
  
  <pre><code>$qb = $em
          -&gt;getRepository('BillingBundle:InvoiceLine')
          -&gt;createQueryBuilder('il')
          -&gt;select('a.id, o.organizationName, i.id')
  </code></pre>
  
  <p>I go on to join the other tables, etc. The problem is the i.id is overwriting the a.id so only two elements are returned instead of three.</p>
  
  <p>How do I either alias the selected fields or create an associative array?</p>