2.7.3 @AttributeOverride

Organization of this subsection
(1) Description
(2) Element

(1) Description

This annotation overrides the following mapping information:

To override the settings of @Column defined in the mapped superclass and embedded class, apply the field or property of the entity class and embedded class in which the mapped superclass is inherited.

If @AttributeOverride is not specified, the column is mapped with the original mapping before override.

If @AttributeOverride is defined in the entity class of a unit that does not have an inheritance relationship, the operation is performed; however, the operation cannot be guaranteed.

The applicable targets are class, method, and field.

(2) Element

The following table lists the @AttributeOverride attributes.

Element nameOptional/RequiredElement description
nameRequiredThis element specifies the name of the field or property in which the mapping is overridden.
columnRequiredThis element specifies the @Column to be overridden.

The details of attributes that are supported with Cosminexus JPA provider are as follows:

(a) name element
Type
String
Description
This element specifies the name of the field or property in which mapping is overridden.
Default value
None
(b) column element
Type
Column
Description
This element specifies the @Column to be overridden.
The definition of the embeddable class or mapped superclass is applied as the mapping type.
You can specify the value within the specifiable range of @Column. For details, see 2.7.6 @Column.
Default value
None