18
18
import org .hibernate .dialect .BooleanDecoder ;
19
19
import org .hibernate .dialect .RowLockStrategy ;
20
20
import org .hibernate .dialect .function .CommonFunctionFactory ;
21
+ import org .hibernate .dialect .function .OracleTruncFunction ;
21
22
import org .hibernate .query .sqm .produce .function .StandardFunctionReturnTypeResolvers ;
22
23
import org .hibernate .dialect .lock .LockingStrategy ;
23
24
import org .hibernate .dialect .lock .OptimisticForceIncrementLockingStrategy ;
@@ -205,7 +206,7 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
205
206
"sysdate" , new CurrentFunction ("sysdate" , "sysdate" , timestampType )
206
207
);
207
208
functionContributions .getFunctionRegistry ().register (
208
- "getdate" , new StandardSQLFunction ("getdate" , StandardBasicTypes . TIMESTAMP )
209
+ "getdate" , new CurrentFunction ("getdate" , "getdate()" , timestampType )
209
210
);
210
211
211
212
// Multi-param date dialect functions
@@ -219,12 +220,11 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
219
220
functionFactory .sinh ();
220
221
functionFactory .tanh ();
221
222
functionContributions .getFunctionRegistry ().register (
222
- "trunc" , new StandardSQLFunction ("trunc" )
223
+ "trunc" ,
224
+ new OracleTruncFunction ( functionContributions .getTypeConfiguration () )
223
225
);
224
226
functionContributions .getFunctionRegistry ().registerAlternateKey ( "truncate" , "trunc" );
225
- functionContributions .getFunctionRegistry ().register (
226
- "round" , new StandardSQLFunction ("round" )
227
- );
227
+ functionFactory .round ();
228
228
229
229
// Bitwise functions
230
230
functionContributions .getFunctionRegistry ()
0 commit comments