Nullability is not properly cascaded to audit tables for primitive types

Description

When defining an entity as follows:

When ORM defines the DDL for creating the table, the active column and other primitive data types will be defined as not null since the property uses the primitive type rather than the Object equivalent which can support nulls. However, when the audit DDL is generated for the corresponding columns in the audit table, Envers generates the DDL differently, actually allowing the primitive type columns to be nullable when it should be identical to that of ORM.

Environment

None

Activity

Show:
Chris Cranford
September 26, 2019, 4:37 PM

This actually makes little sense in hindsight because when an entity is deleted, only the primary key, revision, and revision type are propagated to the columns of the audit row; therefore, most columns should be indicated as nullable in the audit schema for this very reason.

Assignee

Chris Cranford

Reporter

Chris Cranford

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure