hibernate - Spring data JPA native query skip locked -
i want execute skip locked
query on oracle using spring data jpa, tried following:
@lock(lockmodetype.pessimistic_write) @query(value = "select * user id=?1 update skip locked", nativequery = true) user findone(uuid id);
i tried above , found generated query contains for update
, not skip locked
(below generated query logs):
select ent0_.column1 name, ent0_.created_date created_2_33_0_ table_name alias_name ent0_.column1=? update
if remove @lock
query method, generated query not have for update
.
please suggest how can generate query for update skip locked
, required.
Comments
Post a Comment