Author: steve.ebersole(a)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 {
Show replies by date