File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -489,7 +489,7 @@ interface PersonRepository extends PagingAndSortingRepository<Person, String> {
489
489
List<Person> findByLastname(String lastname); <7>
490
490
}
491
491
----
492
- <1> The method shows a query for all people with the given `lastname `.
492
+ <1> The method shows a query for all people with the given `firstname `.
493
493
The query is derived by parsing the method name for constraints that can be concatenated with `And` and `Or`.
494
494
Thus, the method name results in a query expression of `SELECT … FROM person WHERE firstname = :firstname`.
495
495
<2> Use `Pageable` to pass offset and sorting parameters to the database.
@@ -498,7 +498,7 @@ Thus, the method name results in a query expression of `SELECT … FROM person W
498
498
<5> Find a single entity for the given criteria.
499
499
It completes with `IncorrectResultSizeDataAccessException` on non-unique results.
500
500
<6> In contrast to <3>, the first entity is always emitted even if the query yields more result documents.
501
- <7> The `findByLastname` method shows a query for all people with the given last name .
501
+ <7> The `findByLastname` method shows a query for all people with the given `lastname` .
502
502
====
503
503
504
504
The following table shows the keywords that are supported for query methods:
You can’t perform that action at this time.
0 commit comments