LazyInitializationException when Envers persists audit data that uses a proxy with JPA_PROXY_COMPLIANCE enabled under JTA

Description

When operating in a JTA environment with hibernate.jpa.compliance.proxy=true, if an entity that is modified has a lazy-association, as shown below, Envers will result in a LazyInitializationException when attempting to resolve the association's identifier because the associated Session has since been closed.

The entity mappings

Environment

None

Status

Assignee

Chris Cranford

Reporter

Chris Cranford

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure