title: How QueryBuilder's select work?
body: <p>I have a Category that has many Marker. I want to get a category by id with all the markers associated.</p>
  
  <p>I have this query in my Marker's repository:</p>
  
  <pre><code>public function findOneByIdJoinedToCategory($id)
  {
      return $this-&gt;createQueryBuilder('m')
          -&gt;innerjoin('m.category', 'c')
          -&gt;where('c.id = :id')
          -&gt;setParameter('id', $id)
          -&gt;getQuery()
          -&gt;getResult()
      ;
  }
  </code></pre>
  
  <p>It works as intended, i get the category's data with an array marker with all the marker data. But I don't want all the data field so I tested this query:</p>
  
  <pre><code>public function findOneByIdJoinedToCategory($id)
  {
      return $this-&gt;createQueryBuilder('m')
          -&gt;select('m.id', 'm.name', 'm.description', 'm.vicinity', 'm.geo')
          -&gt;innerjoin('m.category', 'c')
          -&gt;addSelect('c.id', 'c.name')
          -&gt;where('c.id = :id')
          -&gt;setParameter('id', $id)
          -&gt;getQuery()
          -&gt;getResult()
      ;
  }
  </code></pre>
  
  <p>When I do this, I except to have only the field I selected, but I have an extra array and get this error : <strong><em>Call to a member function getCategory() on array</em></strong></p>
  
  <p>How do I select my field and get a category with all its marker ?</p>