Skip to content

Commit 1ad62d5

Browse files
committed
Reflect IS NULL/IS NOT NULL usage for derived queries using null as argument.
Closes #3674
1 parent 5fa723c commit 1ad62d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The following table describes the keywords supported for JPA and what a method c
4444
|`Distinct`|`findDistinctByLastnameAndFirstname`|`select distinct ... where x.lastname = ?1 and x.firstname = ?2`
4545
|`And`|`findByLastnameAndFirstname`|`… where x.lastname = ?1 and x.firstname = ?2`
4646
|`Or`|`findByLastnameOrFirstname`|`… where x.lastname = ?1 or x.firstname = ?2`
47-
|`Is`, `Equals`|`findByFirstname`,`findByFirstnameIs`,`findByFirstnameEquals`|`… where x.firstname = ?1`
47+
|`Is`, `Equals`|`findByFirstname`,`findByFirstnameIs`,`findByFirstnameEquals`|`… where x.firstname = ?1` (or `… where x.firstname IS NULL` if the argument is `null`)
4848
|`Between`|`findByStartDateBetween`|`… where x.startDate between ?1 and ?2`
4949
|`LessThan`|`findByAgeLessThan`|`… where x.age < ?1`
5050
|`LessThanEqual`|`findByAgeLessThanEqual`|`… where x.age \<= ?1`
@@ -60,7 +60,7 @@ The following table describes the keywords supported for JPA and what a method c
6060
|`EndingWith`|`findByFirstnameEndingWith`|`… where x.firstname like ?1` (parameter bound with prepended `%`)
6161
|`Containing`|`findByFirstnameContaining`|`… where x.firstname like ?1` (parameter bound wrapped in `%`)
6262
|`OrderBy`|`findByAgeOrderByLastnameDesc`|`… where x.age = ?1 order by x.lastname desc`
63-
|`Not`|`findByLastnameNot`|`… where x.lastname <> ?1`
63+
|`Not`|`findByLastnameNot`|`… where x.lastname <> ?1` (or `… where x.firstname IS NOT NULL` if the argument is `null`)
6464
|`In`|`findByAgeIn(Collection<Age> ages)`|`… where x.age in ?1`
6565
|`NotIn`|`findByAgeNotIn(Collection<Age> ages)`|`… where x.age not in ?1`
6666
|`True`|`findByActiveTrue()`|`… where x.active = true`

0 commit comments

Comments
 (0)