You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/asciidoc/jpa.adoc
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ Spring Data JPA offers the following strategies to detect whether an entity is n
141
141
142
142
1. Version-Property and Id-Property inspection (*default*):
143
143
By default Spring Data JPA inspects first if there is a Version-property of non-primitive type.
144
-
If there is the entity is considered new if the value is `null`.
144
+
If there is, the entity is considered new if the value is `null`.
145
145
Without such a Version-property Spring Data JPA inspects the identifier property of the given entity.
146
146
If the identifier property is `null`, then the entity is assumed to be new.
147
147
Otherwise, it is assumed to be not new.
@@ -245,10 +245,10 @@ The following table describes the keywords supported for JPA and what a method c
245
245
|`NotIn`|`findByAgeNotIn(Collection<Age> ages)`|`… where x.age not in ?1`
246
246
|`True`|`findByActiveTrue()`|`… where x.active = true`
247
247
|`False`|`findByActiveFalse()`|`… where x.active = false`
248
-
|`IgnoreCase`|`findByFirstnameIgnoreCase`|`… where UPPER(x.firstame) = UPPER(?1)`
248
+
|`IgnoreCase`|`findByFirstnameIgnoreCase`|`… where UPPER(x.firstname) = UPPER(?1)`
249
249
|===============
250
250
251
-
NOTE: `In` and `NotIn` also take any subclass of `Collection` as aparameter as well as arrays or varargs. For other syntactical versions of the same logical operator, check "`<<repository-query-keywords>>`".
251
+
NOTE: `In` and `NotIn` also take any subclass of `Collection` as a parameter as well as arrays or varargs. For other syntactical versions of the same logical operator, check "`<<repository-query-keywords>>`".
Spring Data tries to resolve a call to these methods to a named query, starting with the simple name of the configured domain class, followed by the method name separated by a dot. So the preceding example would use the named queries defined in the examlpe instead of trying to create a query from the method name.
305
+
Spring Data tries to resolve a call to these methods to a named query, starting with the simple name of the configured domain class, followed by the method name separated by a dot. So the preceding example would use the named queries defined earlier instead of trying to create a query from the method name.
When using `like`-conditions with values that are coming from a not secure source the values should be sanitized so they can't contain any wildcards and thereby allow attackers to select more data than they should be able to.
531
-
For this purpose the the `escape(String)` method is made available in the SpEL context.
531
+
For this purpose the `escape(String)` method is made available in the SpEL context.
532
532
It prefixes all instances of `_` and `%` in the first argument with the single character from the second argument.
533
533
In combination with the `escape` clause of the `like` expression available in JPQL and standard SQL this allows easy cleaning of bind parameters.
0 commit comments