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

PostgreSQL does not consider alias-specific LockMode

Description

In 5.2, tests fail for PostgreSQL:

hibernate-core:

1 2 3 4 5 6 7 8 org.hibernate.test.locking.LockModeTest > testLegacyCriteria FAILED java.lang.AssertionError org.hibernate.test.locking.LockModeTest > testLegacyCriteriaAliasSpecific FAILED java.lang.AssertionError org.hibernate.test.locking.LockModeTest > testQuery FAILED java.lang.AssertionError

This happens because PostgreSQL uses lock aliases, and the PostgreSQL Dialect logic seems to ignore it altogether. So, if we are providing an alias, we should be taking the LockMode associated to that specific alias.

Environment

None

Status

Assignee

Vlad Mihalcea

Reporter

Vlad Mihalcea

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

5.2.0

Priority

Major