diff --git a/src/main/antora/modules/ROOT/pages/jdbc/transactions.adoc b/src/main/antora/modules/ROOT/pages/jdbc/transactions.adoc index a775a0ee7..b4d9c0b87 100644 --- a/src/main/antora/modules/ROOT/pages/jdbc/transactions.adoc +++ b/src/main/antora/modules/ROOT/pages/jdbc/transactions.adoc @@ -96,7 +96,7 @@ Instead, the `readOnly` flag is propagated as a hint to the underlying JDBC driv Spring Data JDBC supports locking on derived query methods. To enable locking on a given derived query method inside a repository, you annotate it with `@Lock`. -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. +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. Some databases do not make this distinction. In that cases both modes are equivalent of `PESSIMISTIC_WRITE`. @@ -118,5 +118,3 @@ If you are using a databse with the MySQL Dialect this will result for example i ---- Select * from user u where u.lastname = lastname LOCK IN SHARE MODE ---- - -Alternative to `LockMode.PESSIMISTIC_READ` you can use `LockMode.PESSIMISTIC_WRITE`.