Browse Source

Align OffsetScrolling to zero-based indexes.

Closes: #4673
Original pull request: #4678
pull/4693/head
Christoph Strobl 2 years ago committed by Mark Paluch
parent
commit
be3372ba0a
No known key found for this signature in database
GPG Key ID: 55BC6374BAA9D973
  1. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java

@ -312,7 +312,7 @@ public class Query implements ReadConcernAware, ReadPreferenceAware { @@ -312,7 +312,7 @@ public class Query implements ReadConcernAware, ReadPreferenceAware {
Assert.notNull(position, "ScrollPosition must not be null");
this.skip = position.getOffset();
this.skip = position.isInitial() ? 0 : position.getOffset() + 1;
this.keysetScrollPosition = null;
return this;
}

Loading…
Cancel
Save