Clarify lack of @Lock support for String-based queries.

Original pull request #2008

Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

Commit message edited.
This commit is contained in:
mipo256
2025-03-10 11:33:34 +03:00
committed by Jens Schauder
parent 55730eac64
commit 1c15a8bade
2 changed files with 12 additions and 0 deletions

View File

@@ -101,6 +101,10 @@ The required value of type `LockMode` offers two values: `PESSIMISTIC_READ` whic
Some databases do not make this distinction.
In that cases both modes are equivalent of `PESSIMISTIC_WRITE`.
NOTE: It is worth stating explicitly, that `@Lock` currently is not supported on string-based queries. It means,
that queries in the repository, created with `@Query`, will ignore the locking information provided by the `@Lock`,
Using `@Lock` on string-based queries will result in the warning in logs.
.Using @Lock on derived query method
[source,java]
----