File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
PostGIS in Action
this week in the
JDBC and Relational Databases
Java Advanced Topics Training
Java in General
Object Relational Mapping
ClassicQueryTranslatorFactory & Custom Functions Doesn't work?
Joined: Feb 27, 2006
Jun 11, 2009 07:48:52
I am using hibernate 3.2.1-ga version.
I have extended the DB2Dialect and defined my own function:
registerFunction("svminus1", new NoArgSQLFunction("current time", Hibernate.TIME, false) );
It is working fine with ASTQueryTranslatorFactory
HQL: select svminus1() from Temp c where c.id=1
SQL: select current time as col_0_0_ from TEMP c0_ where c0_.ID=1
But when i use ClassicQueryTranslatorFactory, it gives me errors:
org.hibernate.QueryException: aggregate function expected before ( in SELECT [select svminus1() from Temp c where c.id=1]
Why am i getting this error?
I agree. Here's the link:
subject: ClassicQueryTranslatorFactory & Custom Functions Doesn't work?
bigger value in function MAX(x,y)
Conditions for dependent entites on fetching?
Left-right outer join problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015