NOTE: THE "FIX" THAT WAS APPLIED FOR THIS ISSUE WAS INCORRECT, AND WAS COMPLETELY REVERTED BY IN THE SAME HIBERNATE ORM RELEASE. PLEASE SEE FOR MORE INFORMATION.
I have a simple Audited TestClass with two Embedded Attributes:
In the irst case, the column named "THE_TEST" is missing in the Audit Table. The Second attribute is ok.
The class TestCode where the Column is missing:
and it's superclass:
this is the embedded that works fine:
when I add @Audited to the class TestClass it works; but I think this should not be necessary.
The issue seems, specifically, to be with the fact that TestCode extends AbstractCode without adding any attributes. This throws off the audit tracking. The workaround (as noted) is to (1) explicitly mark TestCode as @Audited or (2) add one or more attributes to the @Embeddable subclass (this latter is why Code works).
Hey , any thoughts on this one? Thanks!
Fixed in master, 4.3, and 4.2.
needs to be reverted because it makes an incorrect assumption. Mapped-superclass fields/methods should not be audited unless explictly audited or by using an @AuditOverride.
That is how it currently works for an entity that extends a mapped-superclass; it should work the same way when an embeddable extends a mapped-superclass.
For the test case described in this issue, testCode.code and genericCode.code should not be audited. Only genericCode.codeArt should be audited because the embeddable contains the codeArt field (not the mapped-superclass).
will revert HHH-8908. will make the audit behavior consistent.