Validity audit strategy: end revision timestamp is not stored in tables for joined subclasses

Description

I use envers with the validity audit strategy where the end revision is stored for fast lookups. Additionally, I store the end revision timestamp for an useful partitioning scheme as described in the envers user guide.

The problem is, that the end revision timestamp is not stored in tables which are used by entities which are mapped with the joined-subclass mapping strategy. Of course, the end revision must not be stored in such tables, because they are joined with the superclass table where the end revision is stored. However, the end revision timestamp is necessary for partitioning.

Environment

None

Activity

Show:
Chris Cranford
July 15, 2016, 3:06 PM

I've found how we need to add the field for join tables, but the problem right now is there doesn't appear to be a good way for the audit strategy to know that it needs to update this specific join reference. We can easily deduce this for Felix's use case, but the other is a bit more detailed.

Chris Cranford
August 15, 2016, 7:12 PM

Will track work needed for join tables in HHH-11047.

Chris Cranford
August 15, 2016, 7:30 PM

, I'm curious how you'd prefer we introduce this as a part of 6.0. I'm skeptical whether just adding this without a configuration parameter is appropriate given it does alter schema requirements. I could see enabling this by default with ORM6 but with a configuration parameter to enable legacy behavior where the field isn't added to joined subclass audit tables for backward compatibility. wdyt?

Felix Feisst
August 16, 2016, 8:18 AM

I would enable the behavior by default with the described configuration to enable legacy behavior. The guide for migration from ORM 5 to 6 should be updated accordingly.

Steve Ebersole
December 6, 2018, 3:43 PM

Preparing Alpha1 release

Assignee

Chris Cranford

Reporter

Felix Feisst

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

Affirmative

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure