Envers cannot process deletion of child entity for ManyToOne relation

Description

It worked fine till version 5.4.10.Final, but with beginning with 5.4.11.Final stopped working. Just for information: we found one change related to that in 5.4.11 is

The problems happens in unit test. We delete data from parent and from child entities. Both uses Envers.
The definition of relation to parent in child:

Hibernate deletes parent entity. Then Envers during processing of child entity tries to find the parent in database (it is also not in cache any more) and throws ObjectNotFoundException:

It worked find for the last 5 years and stopped to work now.
Following newly added in 5.4.10 lines of code from ToOneIdMapper causes a problem:

Thanks & best regards.

Environment

JDK 8, Win, OracleDB

Activity

Show:
Sebastian Götz
April 16, 2020, 12:36 PM

Looks like I have a related problem here which causes a LazyInitializationException during the AuditProcess. But above mentioned lines of code were introduced in 5.4.11 not 5.4.10.

Luke Chen
August 5, 2020, 9:25 AM
Edited

Is there any update about this issue? Thanks.

Assignee

Chris Cranford

Reporter

Maxim Schelest

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.4.10

Components

Affects versions

Priority

Blocker
Configure