The LimitHandler is now only used for native queries. Handling of limit/fetch and offset clauses is now covered by the SqlAstTranslator contract. You can override Dialect#getSqlAstTranslatorFactory() and return a custom subtype of DB2SqlAstTranslator which returns false in an override of org.hibernate.dialect.DB2SqlAstTranslator#supportsOffsetClause, but shouldn’t you rather use the DB2zDialect instead? Also, according to the documentation, DB2 z/OS supports the offset clause since version 12. Are you using an older version? If so, the org.hibernate.dialect.DB2zSqlAstTranslator#supportsOffsetClause should already take care of that. |