Hibernate envers and ElementCollection

Description

I have a simple program with a Resource and List of ItemSelection like this

When i m adding resource with 3 elements in itemSelections, hibernate envers log correctly:

when i m updating one line in item_selection, i only see one update in sql but hibernate envers log this:

as you can see, i have a revtype 2 and 0 for the modified line instead of revtype 1 for an update.

I'have try to use @Column(name = "hierarchy_code", nullable = false) but nothing change.

For now my only solution is to transform @ElementCollection into @OneToMany, but I have many @ElementCollection in my application so too many refactoring...

Did I miss something in the configuration? I am using DefaultAuditStrategy, same behavior with ValidityAuditStrategy that only add revend column. Hibernate-envers 5.6.12-Final

Activity

Show:

Details

Assignee

Reporter

Components

Affects versions

Priority

Created February 9, 2023 at 8:21 AM
Updated February 13, 2023 at 7:51 AM