title: How to select all columns with Doctrine QueryBuilder?
body: <p>I have the entities <strong>Store</strong>, <strong>Owner</strong> and <strong>Town</strong> and i want to <strong>count all the stores</strong> that an owner has, categorized by their Town.</p>
  
  <p>I have this Query in my Controller</p>
  
  <pre><code>$query = $this-&gt;getDoctrine()-&gt;getRepository('WebBundle:Store')
     -&gt;createQueryBuilder('s')
       -&gt;select('t.name, COUNT(s) as counter')
       -&gt;groupBy('s.town')
       -&gt;leftJoin('s.owner','o')
       -&gt;leftJoin('s.town','t')
       -&gt;where('s.owner = :id')
       -&gt;orderBy('t.name','ASC')
       -&gt;setParameter('id', $id)
    -&gt;getQuery();
  
  $list = $query-&gt;getResult();
  </code></pre>
  
  <p>Is there any way to <strong>select all columns from Town</strong> instead of declaring every column? Something like <code>-&gt;select('t.*, COUNT(s) as counter')</code>. I can select the ones i need now, but for larger tables I will need other method.</p>
  
  <p>I've tried <code>-&gt;select('t, COUNT(s) as counter')</code> but I got an exception error.</p>
  
  <p>For further information, in my twig template i want to show this:</p>
  
  <pre><code>{% for town in list %}
      &lt;span&gt;{{ town.name }}&lt;/b&gt; [{{ town.counter }}]&lt;/span&gt;
  {% endfor %}
  </code></pre>
  
  <p>Thanks for all in advice!</p>