Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adapt method renaming of getFirstItem() to getOffset() in Pageable.

  • Loading branch information...
commit 916f4feb7539b27670366477d87a87eca76b5349 1 parent 608cbfe
@olivergierke olivergierke authored
View
2  src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java
@@ -150,7 +150,7 @@ private Query bindAndPrepare(Query query, Parameters parameters) {
return result;
}
- result.setFirstResult(getPageable().getFirstItem());
+ result.setFirstResult(getPageable().getOffset());
result.setMaxResults(getPageable().getPageSize());
return result;
View
2  src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java
@@ -360,7 +360,7 @@ public void flush() {
private Page<T> readPage(final TypedQuery<T> query,
final Pageable pageable, final Specification<T> spec) {
- query.setFirstResult(pageable.getFirstItem());
+ query.setFirstResult(pageable.getOffset());
query.setMaxResults(pageable.getPageSize());
Long total = getCountQuery(spec).getSingleResult();
Please sign in to comment.
Something went wrong with that request. Please try again.