Generic LockMode.UPGRADE support

Description

At the moment Hibernate has no support for LockMode.UPGRADE on databases that do not offer explicit support for it. It should be possible to support it on any db - at the expense of performance.

Instead of:

select ... from x where ... for update

one can use

update x set c = c where ...
select ... from x where ...

The Versant Open Access uses the same strategy: http://downloads.hemtech.co.za/jdo/manual/transactions.html
(10.2.1 Locking Mode)

Environment

None

Assignee

Unassigned

Reporter

Dejan Predovic

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Priority

Minor
Configure