diff --git a/src/docbkx/repositories.xml b/src/docbkx/repositories.xml index 6560aecf6..ca1eb32c6 100644 --- a/src/docbkx/repositories.xml +++ b/src/docbkx/repositories.xml @@ -68,7 +68,7 @@ public interface CrudRepository<T, ID extends Serializable> extends Repository<T, ID> { - T save(T entity); + <S extends T> S save(S entity); T findOne(ID primaryKey); @@ -377,7 +377,7 @@ interface UserRepository extends MyBaseRepository<User, Long> { and providing a sorting direction (Asc or Desc). To create a query method that supports dynamic sorting have a look at . + linkend="repositories.special-parameters"/>.
Property expressions @@ -439,12 +439,14 @@ List<User> findByLastname(String lastname, Sort sort); List<User> findByLastname(String lastname, Pageable pageable); - The first method allows you to pass a Pageable - instance to the query method to dynamically add paging to your - statically defined query. Sorting options are handed via - the Pageable instance too. If you only - need sorting, simply add a Sort parameter to your method. - As you also can see, simply returning a + The first method allows you to pass a + org.springframework.data.domain.Pageable instance to the + query method to dynamically add paging to your statically defined + query. Sorting options are handed via the + Pageable instance too. If you only need + sorting, simply add an + org.springframework.data.domain.Sort parameter to your + method. As you also can see, simply returning a List is possible as well. We will then not retrieve the additional metadata required to build the actual Page instance but rather simply