title: Doctrine query builder in Symfony2 error: "Invalid PathExpression. Must be a StateFieldPathExpression"
body: <p>When I try to use this query:</p>
  
  <pre><code>$repository = $this-&gt;getDoctrine()
                      -&gt;getRepository('AcmeCommentoBundle:Commento');
                      $query = $repository-&gt;createQueryBuilder('p')
                              -&gt;select('DISTINCT p.user')
                              -&gt;where('p.annuncio = :annuncio')
                              -&gt;setParameter('annuncio', $annuncio)
                              -&gt;getQuery();
  
                      $utenti = $query-&gt;getResult();
  </code></pre>
  
  <p>It returns this error:</p>
  
  <pre><code>[Semantical Error] line 0, col 18 near 
      'user FROM Acme\CommentoBundle\Entity\Commento': 
       Error: Invalid PathExpression. Must be a StateFieldPathExpression. 
  </code></pre>
  
  <p>What does this error mean?</p>