jakartaee / persistence

https://jakartaee.github.io/persistence/
Other
203 stars 59 forks source link

add lockMode to @EntityResult #472

Closed gavinking closed 1 year ago

gavinking commented 1 year ago

A native query can pessimistically or optimistically lock an entity in its result set.

It would be nice if the EM could know about this.

We could add:

LockModeType lockMode() default OPTIMISTIC;

to @EntityResult.