I am upgrading to Hibernate 5 from 4. I am getting below error while application startup.
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: FETCH near line 1
The named queries have "fetch first ? rows only", which was working fine with hibernate 4. Not sure how to solve this. I am using DB2 dialect. Also i have used jpa 2.2. I found below article but its for oracle. Hibernate 5 change not to use fetch first rows only
Thanks,
After some analysis , i have found that FETCH has not been supported anymore in hibernate 5.