title: Doctrine querybuilder
body: <p>I build a symfony project but I have an issue with doctrine query builder.
  I have two entities one named projet and the other named statutprojet and relation ManyToOne.<br><br>
  I want to count projects and use group by statutprojet. 
  <br><br>I try this and i get the result like this with a var_dump:</p>
  
  <pre><code>array (size=2)
  0 =&gt; 
  array (size=1)
    1 =&gt; string '1' (length=1)
  1 =&gt; 
  array (size=1)
    1 =&gt; string '2' (length=1)
  </code></pre>
  
  <p>i want to display the result with statutprojet libelle or id </p>
  
  <p>this is my code :</p>
  
  <pre><code> $repo = $this   -&gt;getDoctrine()
          -&gt;getManager()
          -&gt;getRepository('BackOfficeBundle:Projet');
  
      $qb = $repo-&gt;createQueryBuilder('p');
      $qb-&gt;select('COUNT(p)');
      $qb-&gt;groupBy('p.statutprojet');
  
  
      $projets = $qb-&gt;getQuery()-&gt;getArrayResult();
  </code></pre>