title: to_char function throws exception with Hibernate
body: <p>I'm trying to execute sql statement on a grails domain object. Is works fine when executed on db (h2) directly.</p>
  
  <pre><code>Call.executeQuery "select to_char(date,'DD') from Call"
  </code></pre>
  
  <p>Via hibernate I get:</p>
  
  <blockquote>
    <p>No data type for node: org.hibernate.hql.internal.ast.tree.MethodNode 
    -[METHOD_CALL] MethodNode: '('
        +-[METHOD_NAME] IdentNode: 'to_char' {originalText=to_char}
        -[EXPR_LIST] SqlNode: 'exprList'
           +-[DOT] DotNode: 'call0_.date' {propertyName=date,dereferenceType=PRIMITIVE,getPropertyPath=date,path={synthetic-alias}.date,tableAlias=call0_,className=com.olamagic.Call,classAlias=null}
           |  +-[IDENT] IdentNode: '{synthetic-alias}' {originalText={synthetic-alias}}
           |  -[IDENT] IdentNode: 'date' {originalText=date}
           -[QUOTED_STRING] LiteralNode: ''DD''</p>
  </blockquote>