@Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn (....) public abstract class BaseClass { .... @Audited public String getSomeProperty() {...} }
@Entity @DiscriminatorValue(value = "...") public class Derived extends BaseClass { .... // no @Audited here .... }
public void onPostInsert(PostInsertEvent event) { String entityName = event.getPersister().getEntityName(); if ( getAuditConfiguration().getEntCfg().isVersioned( entityName ) ) { // zonk here? // auditing seems to be enclosed here }