title: Error with function `right` in select statement in hbm file
body: <p>i get an error with the following statement in a hibernate hbm file:</p>
  
  <pre><code>...
  &lt;subselect&gt;
     &lt;![CDATA[
        select t.colA, right(t.colB, 12) b
     ]]&gt;
  &lt;/subselect&gt;
  ...
  </code></pre>
  
  <p>The error is <code>Caused by: java.sql.SQLException: ORA-00904: "RIGHT": invalid Identifier</code></p>
  
  <p>Database: Oracle 11g
  Hibernate: 3.5.6-Final</p>
  
  <p>On the Java side i use Hibernate Criteria to retrieve the data from the database.
  Without the <code>right</code> function it works without error.
  The statement runs without error too directly executed with an sql client on the database.</p>
  
  <p>Could the Criteria API causes the problem?</p>