Skip to content

Commit be3372b

Browse files
christophstroblmp911de
authored andcommitted
Align OffsetScrolling to zero-based indexes.
Closes: #4673 Original pull request: #4678
1 parent abbe4f3 commit be3372b

File tree

1 file changed

+1
-1
lines changed
  • spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query

1 file changed

+1
-1
lines changed

Diff for: spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ public Query with(OffsetScrollPosition position) {
312312

313313
Assert.notNull(position, "ScrollPosition must not be null");
314314

315-
this.skip = position.getOffset();
315+
this.skip = position.isInitial() ? 0 : position.getOffset() + 1;
316316
this.keysetScrollPosition = null;
317317
return this;
318318
}

0 commit comments

Comments
 (0)