title: Doctrine QueryBuilder and concat issues
body: <p>I have the following code, which relies on Doctrine's QueryBuilder API to generate DQL statetements.</p>
  
  <pre><code>class PlayerRepository extends EntityRepository
  {
      public function findByPartialNameMatch($trainer, $fullName)
      {
          $qb = $this-&gt;createQueryBuilder('tp');
  
          $qb-&gt;innerJoin('tp.player', 'p')
              -&gt;where($qb-&gt;expr()-&gt;andX(
                      $qb-&gt;expr()-&gt;orX(
                          $qb-&gt;expr()-&gt;like(
                              $qb-&gt;expr()-&gt;concat('p.firstName', $qb-&gt;expr()-&gt;concat(' ', 'p.lastName')),
                              $qb-&gt;expr()-&gt;literal($fullName.'%')
                          ),
                          $qb-&gt;expr()-&gt;like(
                              $qb-&gt;expr()-&gt;concat('p.lastName', $qb-&gt;expr()-&gt;concat(' ', 'p.firstName')),
                              $qb-&gt;expr()-&gt;literal($fullName.'%')
                          )
                      ),
                      $qb-&gt;expr()-&gt;eq('tp.trainer', '?1')
                   )
               )
          -&gt;groupBy('p.id')
          -&gt;orderBy('p.lastName', 'ASC')
          -&gt;orderBy('p.firstName', 'ASC')
          -&gt;setParameter(1, $trainer);
  
      return $qb-&gt;getQuery()-&gt;getResult();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>When I run it, Symfony2 throws the following error message:</p>
  
  <pre><code>[Syntax Error] line 0, col 123: Error: Expected StateFieldPathExpression | string |      InputParameter | FunctionsReturningStrings | AggregateExpression, got ',' 
  </code></pre>
  
  <p>A look at the stack trace, reveals the following:</p>
  
  <pre><code>at QueryException ::syntaxError ('line 0, col 123: Error: Expected   StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings |  AggregateExpression, got ','')
  in D:\Work\vendor\doctrine\lib\Doctrine\ORM\Query\Parser.php at line 396  -+
  at Parser -&gt;syntaxError ('StateFieldPathExpression | string | InputParameter |  FunctionsReturningStrings | AggregateExpression')
  in D:\Work\vendor\doctrine\lib\Doctrine\ORM\Query\Parser.php at line 2391  -+
  at Parser -&gt;StringPrimary ()
  in D:\Work\vendor\doctrine\lib\Doctrine\ORM\Query\AST\Functions\ConcatFunction.php at line 60  -+
  at ConcatFunction -&gt;parse (object(Parser))
  in D:\Work\vendor\doctrine\lib\Doctrine\ORM\Query\Parser.php at line 2852  -
  </code></pre>
  
  <p>From the above, I understand that the issue is somehow related to the concat helper function, and that the function expects the enumerated input but somehow(?) received a comma (,).</p>
  
  <p>What is wrong with the code above? Hours of search could not shed a light into the problem.</p>
  
  <p>Thank you for all your help!</p>