title: Hibernate session.createQuery error while replace method with single quote
body: <p>I got very typical issue. My dynamically generated query like this...</p>
  
  <pre><code>UPDATE Templates t SET t.TEMPLATE_DATA =  replace(t.TEMPLATE_DATA, 'Test\'s&amp;#32;Test', 'Kent&amp;quot;s Test'), t.TEMPLATE_DATA =  replace(t.TEMPLATE_DATA, 'Test&amp;amp;quot;s&amp;amp;#32;Test', 'Kent&amp;quot;s Test'), UPDATE_DATE = NOW() where PRACTICE_ID = 1 AND CATEGORY_ID IN (1)
  </code></pre>
  
  <p>This works perfect when I explictily fire this query in db. but by using hibernate's session.createQuery(-- my query --) if thwows an error <strong>QueryTranslatorException</strong>.</p>
  
  <pre><code>Database : Mysql 5.3
  </code></pre>
  
  <p>Have any one faced this issue?
  Thanks in advance.</p>