mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-23 12:19:09 +00:00
Explicit locking method withLock() is unaccessible on query beans
This commit is contained in:
@@ -679,7 +679,7 @@ public abstract class TQRootBean<T, R> {
|
||||
* Provides us with the ability to explicitly use Postgres
|
||||
* SHARE, KEY SHARE, NO KEY UPDATE and UPDATE row locks.
|
||||
*/
|
||||
R withLock(Query.LockType lockType) {
|
||||
public R withLock(Query.LockType lockType) {
|
||||
query.withLock(lockType);
|
||||
return root;
|
||||
}
|
||||
@@ -693,7 +693,7 @@ public abstract class TQRootBean<T, R> {
|
||||
* Provides us with the ability to explicitly use Postgres
|
||||
* SHARE, KEY SHARE, NO KEY UPDATE and UPDATE row locks.
|
||||
*/
|
||||
R withLock(Query.LockType lockType, Query.LockWait lockWait) {
|
||||
public R withLock(Query.LockType lockType, Query.LockWait lockWait) {
|
||||
query.withLock(lockType, lockWait);
|
||||
return root;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ public class QCustomerTest {
|
||||
// not found using other transaction
|
||||
final Customer foundNot = new QCustomer()
|
||||
.name.eq("explicitTransaction")
|
||||
.withLock(Query.LockType.SHARE)
|
||||
.findOne();
|
||||
assertThat(foundNot).isNull();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user