We're updating the issue view to help you get more done. 

Add support for KEY/NO KEY locking in PostgreSQL

Description

As explained in this forum thread, PostgreSQL provides the `NO KEYS` directive for pessimistic locking which allows child records that reference a parent row which was locked to be inserted.

To address this requirement, we have two options:

  1. We could add a Hibernate configuration property which will allow Hibernate to use `KEY/NO KEY` when doing a PESSIMISTIC_READ or PESSIMISTIC_WRITE.

  2. We could add a new LockOptions.NO_KEY for this purpose.

  3. Using a Query Hint.

Environment

None

Status

Assignee

Unassigned

Reporter

Vlad Mihalcea

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Minor