title: Multiple join in symfony: Error: Expected =, <, <=, <>, >, >=, !=
body: <p>I'm trying to create and action that returns all Variantset for a given PrivateUser. It's a many-to-many relationship, so there's a connection table in between.</p>
  
  <p>This is the query I'm trying to run</p>
  
  <pre><code> $variants = $repository-&gt;createQuery('SELECT variants 
              FROM AppBundle:PrivUser user 
              JOIN AppBundle:PrivUserVariantset uv
              JOIN AppBundle:Variantset variants 
              WHERE user.iduser=:user_id')
          -&gt;setParameter('user_id', $userid)
          -&gt;getResult();
  </code></pre>
  
  <p>but it returns: </p>
  
  <pre><code>[Syntax Error] line 0, col 146: Error: Expected =, &lt;, &lt;=, &lt;&gt;, &gt;, &gt;=, !=, got 'variants'
  </code></pre>
  
  <p>If I try the very same query with a single join, getting for instance the number of Variantsets from the PrivUserVariantset table, it does work. It looks like a syntax error, but I don't manage to find it from the examples I have gathered.</p>
  
  <p>Is this the right way to do this query?</p>