8.12.3 @AttributeOverride
- Organization of this subsection
(1) Description
This annotation overrides the following mapping information:
-
Properties or fields specified by @Basic (applied by default)
-
Properties or fields applied by default
-
Properties or fields specified by @Id
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 name |
Optional/Required |
Element description |
---|---|---|
Required |
This element specifies the name of the field or property in which the mapping is overridden. |
|
Required |
This 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 8.12.6 @Column.
- Default value
-
None