From 4270b4777fc7e2de77fb3e66e8eaa8d351f22225 Mon Sep 17 00:00:00 2001 From: nrodrigues Date: Thu, 22 Mar 2012 16:57:25 +0000 Subject: [PATCH] HHH-7068 - Fix for "Cursor state not valid" error from AS400 on queries with setFirstResult. --- hibernate-core/src/main/java/org/hibernate/loader/Loader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/loader/Loader.java b/hibernate-core/src/main/java/org/hibernate/loader/Loader.java index e54d21ab56..62e6516b7c 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/Loader.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/Loader.java @@ -1700,7 +1700,7 @@ public abstract class Loader { final boolean canScroll = getFactory().getSettings().isScrollableResultSetsEnabled(); final boolean useScrollableResultSetToSkip = hasFirstRow && !useLimitOffset && canScroll; - final ScrollMode scrollMode = getScrollMode( scroll, hasFirstRow, useLimit, queryParameters ); + final ScrollMode scrollMode = getScrollMode( scroll, hasFirstRow, useLimitOffset, queryParameters ); // // if(canScroll && ( scroll || useScrollableResultSetToSkip )){ // scrollMode = scroll ? queryParameters.getScrollMode() : ScrollMode.SCROLL_INSENSITIVE;