Мы мигрируем с Springboot 2-3, что включает в себя Hibernate от 5 до 6 миграции < /p>
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)"));
}
}
Подробнее здесь: https://stackoverflow.com/questions/765 ... ibernate-6