Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/asciidoc/jdbc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ interface PersonRepository extends PagingAndSortingRepository<Person, String> {
Stream<Person> streamByLastname(String lastname); <8>
}
----
<1> The method shows a query for all people with the given `lastname`.
<1> The method shows a query for all people with the given `firstname`.
The query is derived by parsing the method name for constraints that can be concatenated with `And` and `Or`.
Thus, the method name results in a query expression of `SELECT … FROM person WHERE firstname = :firstname`.
<2> Use `Pageable` to pass offset and sorting parameters to the database.
Expand All @@ -479,7 +479,7 @@ Thus, the method name results in a query expression of `SELECT … FROM person W
<5> Find a single entity for the given criteria.
It completes with `IncorrectResultSizeDataAccessException` on non-unique results.
<6> In contrast to <3>, the first entity is always emitted even if the query yields more result documents.
<7> The `findByLastname` method shows a query for all people with the given last name.
<7> The `findByLastname` method shows a query for all people with the given `lastname`.
<8> The `streamByLastname` method returns a `Stream`, which makes values possible as soon as they are returned from the database.
====

Expand Down