Skip to content

Commit 1456788

Browse files
committed
Polishing.
Original pull request #1166
1 parent f7887f8 commit 1456788

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/asciidoc/jdbc.adoc

+5-1
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,11 @@ If you have multiple implementations registered in the `ApplicationContext`, you
10501050
[[jdbc.locking]]
10511051
== JDBC Locking
10521052

1053-
Spring Data JDBC currently supports locking on derived query methods. To enable locking on a given derived query method inside a repository, you just need to add the `@Lock` annotation above it.
1053+
Spring Data JDBC supports locking on derived query methods.
1054+
To enable locking on a given derived query method inside a repository, you annotate it with `@Lock`.
1055+
The required value of type `LockMode` offers two values: `PESSIMISTIC_READ` which guarantees that the data you are reading doesn't get modified and `PESSIMISTIC_WRITE` which obtains a lock to modify the data.
1056+
Some databases do not make this distinction.
1057+
In that cases both modes are equivalent of `PESSIMISTIC_WRITE`.
10541058

10551059
.Using @Lock on derived query method
10561060
====

0 commit comments

Comments
 (0)