[hibernate-commits] Hibernate SVN: r15266 - core/trunk/core/src/main/java/org/hibernate/hql/ast/tree.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Tue Oct 7 23:13:09 EDT 2008


Author: steve.ebersole at jboss.com
Date: 2008-10-07 23:13:08 -0400 (Tue, 07 Oct 2008)
New Revision: 15266

Modified:
   core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/IdentNode.java
Log:
HHH-3510 : HQL SQLFunction replacement not occuring when HQL text has no parenthesis (rollback)

Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/IdentNode.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/IdentNode.java	2008-10-08 03:06:23 UTC (rev 15265)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/IdentNode.java	2008-10-08 03:13:08 UTC (rev 15266)
@@ -27,6 +27,7 @@
 import antlr.SemanticException;
 import antlr.collections.AST;
 import org.hibernate.QueryException;
+import org.hibernate.dialect.function.SQLFunction;
 import org.hibernate.hql.antlr.SqlTokenTypes;
 import org.hibernate.hql.ast.util.ColumnHelper;
 import org.hibernate.persister.collection.QueryableCollection;
@@ -289,7 +290,8 @@
 		if ( fe != null ) {
 			return fe.getDataType();
 		}
-		return null;
+		SQLFunction sf = getWalker().getSessionFactoryHelper().findSQLFunction( getText() );
+		return sf == null ? null : sf.getReturnType( null, null );
 	}
 
 	public void setScalarColumnText(int i) throws SemanticException {




More information about the hibernate-commits mailing list