I'm migrating an application, that uses DB2 database, from Spring(IBM Websphere) to Springboot(Embedded Tomcat).
The existing application, that uses hibernate 4.1.9.Final, runs perfectly using this FETCH query :
@Query(
"SELECT ssss FROM SSSSPackageDiscountLoad ssss, SSSBasicLoad ttt WHERE ssss.schemeId = ttt.id AND ttt.code = :schemeCode AND "
+ "ssss.ruleCode = :ruleCode ORDER BY ssss.effDate DESC FETCH FIRST 1 ROWS ONLY")
The migrated springboot(version 2.1.7.RELEASE) app uses hibernate 5.3.10.Final.
Starting the application gives me this issue :
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: FETCH near line 1, column 255