| Using the following entity configuration:
@Entity
@Audited
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "type")
public abstract class ParentEntity {
@Id
@GeneratedValue
private Integer id;
private String type;
/** getter/setters **/
}
@Entity
@Audited
@DiscriminatorValue("child")
public class ChildEntity extends ParentEntity {
private String name;
/** getter/setters **/
}
Hibernate will insert *child* as the discriminator value on the ORM side; however, the fully qualified class name of the audited entity will be used in the envers audit tables.
In Hibernate 4.3.11.Final, this wasn't observed and the actual configured discriminator value was used instead. |