Hibernate Envers creates unnecessary audit rows for tables with LOB data

Description

Given an audited entity that contains an audited @Lob byte[] field and some other non audited field (annotated with @NotAudited), an audit row will be incorrectly inserted whenever the non audited field is modified.

The impact of this issue can be very significant if the @Lob byte[] field contains a large amount of binary data such as images, and the non-audited field is updated very frequently, as this will cause very rapid growth of the audit table.

Note that the issue can be worked around by using a String data type annotated with @Lob instead of byte[], and base64 encoding the binary data.

Environment

None

Status

Assignee

Chris Cranford

Reporter

Jon Kranes

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.1.0

Priority

Major