From 101b3c8d47dfe44147280e4b368b08b10ef3c042 Mon Sep 17 00:00:00 2001 From: Peter Luladjiev Date: Sat, 2 Oct 2021 11:05:49 +0300 Subject: [PATCH] Fix typo in Query Methods documentation. Closes #1064 --- src/main/asciidoc/jdbc.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/asciidoc/jdbc.adoc b/src/main/asciidoc/jdbc.adoc index be343568..8d9b3790 100644 --- a/src/main/asciidoc/jdbc.adoc +++ b/src/main/asciidoc/jdbc.adoc @@ -470,7 +470,7 @@ interface PersonRepository extends PagingAndSortingRepository { Stream 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. @@ -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. ====