Old property value in MOD-Field

Description

Hello,

I would like to ask if there is a plan to add a feature similar to the actual MOD column which doesn't store a flag if the property value has changed, but the old value, i.e:

REV

AMOUNT

AMOUNT_OLD

123

5

6

BR, Maria

Environment

None

Activity

Show:
Chris Cranford
May 22, 2016, 12:04 AM

What do you gain by using this versus the way the auditing tables are designed today, out of curiosity?

Chris Cranford
October 1, 2019, 10:54 PM

Hi , I do not foresee this type of feature being implemented in this particular way. The concern with this type of implementation is how would Envers actually expose this AMOUNT_OLD column in a meaningful way via an API?

What most users tend to do today is fetch the two instances and use a 3rd party library or write their own comparison code to compare the properties of the two objects and determine the value differences.

I believe a better alternative would be to expose a set of APIs in the Envers Query framework where criteria would be provided and Envers would provide a historical difference report for the user, complete with old/new values, etc. This avoids making schema changes like you suggest and becomes a feature that existing users would be able to make use of as well.

Would you be interested in contributing such a solution?

Assignee

Unassigned

Reporter

mv

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure