Skip to content

Commit 50a0eed

Browse files
christophstroblapp
authored and
app
committed
Align OffsetScrolling to zero-based indexes.
Closes: spring-projects#4673 Original pull request: spring-projects#4678
1 parent e3c0b62 commit 50a0eed

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

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)