HHH-18309 Fix Oracle limit handler for native queries

This commit is contained in:
Marco Belladelli 2024-07-02 16:06:02 +02:00
parent bfb196291c
commit 0884144384
1 changed files with 9 additions and 2 deletions

View File

@ -33,10 +33,17 @@ public class Oracle12LimitHandler extends AbstractLimitHandler {
@Override
public String processSql(String sql, Limit limit, QueryOptions queryOptions) {
final boolean hasFirstRow = hasFirstRow( limit );
final boolean hasMaxRows = hasMaxRows( limit );
if ( !hasFirstRow && !hasMaxRows ) {
return sql;
}
return processSql(
sql,
hasFirstRow( limit ),
hasMaxRows( limit ),
hasFirstRow,
hasMaxRows,
queryOptions.getLockOptions()
);
}