When defining an entity as follows:
@Entity
@Audited
public class MyEntity {
@Id
private Integer id;
private boolean active;
}
When ORM defines the DDL for creating the table, the active column will be defined as not null since the property uses the primitive boolean type rather than the Object equivalent which can support nulls. However, when the audit DDL is generated for the corresponding column in the audit table, Envers generates the DDL differently, actually allowing the active column to be nullable when it should be identical to that of ORM. |