HHH-15042: add offset-clause usage for DB2zDialect

This commit is contained in:
og151037 2022-01-19 12:56:56 +01:00 committed by Christian Beikov
parent 227930b090
commit 4775be3bb8
1 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import org.hibernate.dialect.identity.DB2390IdentityColumnSupport;
import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.pagination.FetchLimitHandler;
import org.hibernate.dialect.pagination.LimitHandler;
import org.hibernate.dialect.pagination.OffsetFetchLimitHandler;
import org.hibernate.dialect.sequence.DB2zSequenceSupport;
import org.hibernate.dialect.sequence.NoSequenceSupport;
import org.hibernate.dialect.sequence.SequenceSupport;
@ -82,7 +83,9 @@ public class DB2zDialect extends DB2Dialect {
@Override
public LimitHandler getLimitHandler() {
return FetchLimitHandler.INSTANCE;
return getZVersion().isBefore(12)
? FetchLimitHandler.INSTANCE
: OffsetFetchLimitHandler.INSTANCE;
}
@Override