Envers delete doesn't insert a new row with revtype=2 for unidirectional manytomany collections

Description

When I create a unidirectional many to many relationship for audited entities with join table, It only does insert on the join table with revtype=INSERT, but not revtype=DELETE when I delete the object or replace the collection with a new one.

@ManyToMany
@JoinTable(
name="test_assoc",
joinColumns = @JoinColumn( name="id_test"),
inverseJoinColumns = @JoinColumn( name="id_assoc")
)
public List<Assoc> assocs;

when it inserts, test_assoc_AUD gets insert revtype=0, but when it deletes, test_assoc_AUD doesn't gets insert revtype=2

Environment

None

Status

Assignee

Lukasz Antoniak

Reporter

Andrew Chen

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.1.11
4.1.9
4.1.10

Priority

Major