title: HQL concat function
body: <p>My underlined database is MS SQL server. I am using HQL query through java hibernate.
  If I am using replace function inside concat, it mis-interprets the query.
  Eg : </p>
  
  <pre><code>HQL Query : from Project  where replace('\\\\yyy\\\\','\\\\','\\\\\\\\') like concat(replace(projectPathPrefix,'\\\\','\\\\\\\\\\\\\\\\')),'%') and sourceControlSystems=3
  
  SQL interpretation : select * from PRJ_project project where (replace('\\ooo\\', '\\', '\\\\') like replace(project0_.project_path_prefix+'\\'+'\\\\\\\\')+'%' and source_control_system_id=3
  </code></pre>
  
  <p>It also converts the commas <code>,</code> of replace function into <code>+</code> as the outer parenthesis contains concat function. This works fine if undeslined database is MySQL or Oracle, as both uses concat function. But, as SQL server uses "+" operator for concatenation HQL replace concat function with <code>+</code> in a very absurd manner. Please suggest some solution to this.</p>