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.
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.
Will track work needed for join tables in HHH-11047.
, 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?
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.
Preparing Alpha1 release