Envers - modified flag column value set to null from 5.4.7 onwards

Description

Release 5.4.7 and beyond has introduced an issue in Envers (for me, at least) whereby some modified flag column values are always null which causes data constraint violations and an inability to persist entities and auditing info.

This may be related to this issue: HHH-10398

I have a class with a number of @Audited annotations. The simple string value fields (name, description etc) work as expected and I can see in the logs that hibernate is persisting the modified flag column value correctly - true on create and false/true on update thereafter. The @Enumerated and @ManyToOne mappings modified column values are always null. I went back to release version 5.3.14.Final which works for me and every release up to and including 5.4.6 works.

Below is an abbreviated class with the relevant annotations. There are other mappings that I have omitted for brevity - some audited OneToOne and OneToMany that work as expected.

Relevant configuration entries:

Thanks,
Craig

Environment

Hibernate 5.4.9.Final
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)
mysql Ver 14.14 Distrib 5.7.27, for macos10.14 (x86_64) using EditLine wrapper
Spring boot 2.2.2-Release

Assignee

Chris Cranford

Reporter

Craig Chapman

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.4.1
5.4.2
5.4.3
5.4.4
5.4.5
5.4.6
5.3.14

Components

Affects versions

Priority

Blocker
Configure