title: Doctrine2 DQL TRIM with parameters
body: <p>I am trying to execute an update query in DQL to a mysql database with Doctrine2. Here is my code:</p>
  
  <pre><code>        $updateFiles = $entityManager
                  -&gt;createQuery("UPDATE Attachment a "
                  . "SET a.filename=CONCAT(:dst, TRIM(LEADING :src FROM a.filename)) "
                  . "WHERE a.owner=:ownerId AND a.filename LIKE :srcLike");
          $updateFiles-&gt;setParameter("dst", $dstFile);
          $updateFiles-&gt;setParameter("src", $srcFile);
          $updateFiles-&gt;setParameter("ownerId", $this-&gt;owner-&gt;getId());
          $updateFiles-&gt;setParameter("srcLike", $srcFile.'/%');
          $updateFiles-&gt;execute();
  </code></pre>
  
  <p>When I execute this code, I get the following syntax error :</p>
  
  <pre><code>[Syntax Error] line 0, col 77: Error: Expected Doctrine\ORM\Query\Lexer::T_FROM, got ':src'
  </code></pre>
  
  <p>I try to execute the query without TRIM and CONCAT and it works. If I replace :src by 'somerandomtext' there is no error. The syntax of TRIM is <a href="http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#dql-functions" rel="nofollow" title="correct">correct</a>! For some reason, the parameter :src is not replaced.</p>
  
  <p>Is this a bug or did I miss something ? </p>