Query not properly locking non-versioned entities associated with PersistenceContext

Description

There is some bad logic in Loader#instanceAlreadyLoaded handling upgrading lock modes when entities are already associated with PersistenceContext which are not versioned

Environment

None

Assignee

Steve Ebersole

Reporter

Steve Ebersole

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major
Configure