Browse Source

Small documentation fix.

Improve grammar.
Remove redundant line.

Original pull request #1765
pull/1772/head
Aaron Paterson 2 years ago committed by Jens Schauder
parent
commit
5a3ceb200d
No known key found for this signature in database
GPG Key ID: 89F36EDF8C1BEA56
  1. 4
      src/main/antora/modules/ROOT/pages/jdbc/transactions.adoc

4
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 @@ -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 @@ -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`.

Loading…
Cancel
Save