AuditReader returns deleted references

Description

Hi,

I found different behavior in Oracle and H2 when using AuditReader.

Given is ClassA and ClassB. ClassA has a set of type ClassB which is an ElementCollection which means ClassB is an @Embeddable while ClassA is an @Entity.

Problem occures in following scenario:

1. Persist an object of type ClassA with one reference to an object1 of type ClassB.
2. Load object of type ClassA from db (entityManager), change the reference means remove object1 from set and add object2 of type ClassB to set
3. Update ClassA
4. Load object of type ClassA via AuditReader in newest revision.

Result:

H2.

Loaded object has one reference in Set which is object2 of type classB

Oracle:

Loaded object has two references in Set which are object1 and object2 of type classB.

In my opinion only the result from H2 is correct because in both tables object1 is marked with REV_TYPE=2 (Deleted) in latest revision.

In fact it leads to wrong results because the loaded object of type ClassA does not describe the correct state at this revision.

Environment

None

Activity

Show:
Markus Hens
August 4, 2017, 2:34 PM

Seems that error was on our side. Ticket can be closed.

Chris Cranford
August 7, 2017, 12:25 PM

Sounds good , thanks for letting us know.

Assignee

Chris Cranford

Reporter

Markus Hens

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.0.9

Components

Affects versions

Priority

Major
Configure