0

We are Migrating from springboot 2 to 3 which includes hibernate 5 to 6 migration

public class ExtendSqlServer2012Dialect extends SqlServer2012Dialect{
    public ExtendSqlServer2012Dialect(){
        registerFunction("datediffhr", new SQLFunctionemplate(StandardBasicTypes.INTEGER,"datediff(hour,?1,?2)"));
        registerFunction("dateaddhr", new SQLFunctionemplate(StandardBasicTypes.TIMESTAMP,"dateaddhr(hour,0,?1)"));
    }
}
gdomo
  • 1,650
  • 1
  • 9
  • 18
anil
  • 1
  • 4
  • https://stackoverflow.com/q/72013981/175554 is for postgresql and you can figure out sqlserver after all hibernate is a multi db ORM :) – ozkanpakdil Jun 21 '23 at 22:53

0 Answers0