jakartaee / jakartaee/persistence
Make LockModeType a FetchOption
- Dominant language
- Java
- Stars
- 267
- Forks
- 78
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 13
Description
It might be nice to be able to specify locking for a fetched association, using `node.addOption(PESSIMISTIC_WRITE)` or whatever. For a collection with many elements, this could be much more efficient than locking them one by one with subsequent selects.
On the other hand, there are implementability concerns here, which I'm going to leave to @sebersole to think through.
This is more of a 4.1 candidate I would say.
Contributor guide
Research direction
Start by tracing the FetchOption and LockModeType APIs referenced in the issue, then examine how fetched associations and collection elements are currently loaded and locked. Determine whether locking can be expressed as a fetch option without the implementability concerns noted in the issue; done means the API behavior and coverage for collection fetching are clearly specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100