This annotation specifies the column for identification used in the SINGLE_TABLE strategy or JOINED strategy. This annotation is added to an entity class that becomes a superclass by inheriting an entity class.
The applicable target is class.
The following table lists the elements of @DiscriminatorColumn:
Element name | Optional/Required | Element description |
---|---|---|
name | Optional | This element specifies the name of the column for identification. |
discriminatorType | Optional | This element specifies the type of the column for identification. |
columnDefinition | Optional | This element is used to describe the constraints added to the column for identification in the DDL, when the CREATE statement is output. Note that Cosminexus JPA provider does not support this attribute. |
length | Optional | This element specifies the length when the column for identification is a character string. Note that Cosminexus JPA provider does not support this attribute. |
The details of attributes that are supported with Cosminexus JPA provider are as follows: