| Gail Badner, I have tested this using the following Entity / Embeddable scenario:
@MappedSuperclass
public class AbstractEmbeddable {
private String auditedSuperclassData;
private String nonAuditedSuperclassData;
private String nonAuditedSuperclassDataTwo;
/* other stuff eliminated for breavity */
}
@Embeddable
@AuditOverride(name = "nonAuditedSuperclassDataTwo", forClass = AbstractEmbeddable.class, isAudited = false)
public class BaseEmbeddable {
private String auditedEmbeddableData;
private String nonAuditedEmbeddableData;
/* other stuff eliminated for breavity */
}
@Entity
@Audited
public class BaseEntity {
/* other stuff eliminated for breavity */
@Embedded
@AuditOverrides({
@AuditOverride(name = "nonAuditedSuperclassData", forClass = AbstractEmbeddable.class, isAudited = false),
@AuditOverride(name = "nonAuditedEmbeddableData", isAudited = false)
})
private BaseEmbeddable embeddable;
}
Envers will not audit nonAuditedEmbeddableData, nonAuditedSuperclassData, nor nonAuditedSuperclassDataTwo. Placing @Audited on the @Embeddable has no impact to the intended behavior. Is this scenario what you observed did not work in 4.2 that you recall? |