Hitachi

uCosminexus Application Server Compatibility Guide


8.12.1 @AssociationOverride

Organization of this subsection

(1) Description

This annotation overrides the settings used in the ManyToOne relationship or the OneToOne relationship specified in a mapped superclass and an embedded class.

When @AssociationOverride is not specified, the external key column is mapped in the same way as the original mapping.

The applicable targets are class, method, and field.

(2) Element

The following table lists the elements of @AssociationOverride:

Element name

Optional/Required

Element description

name

Required

This element specifies the name of the field or property having the related mapping that is to be overridden.

joinColumns

Required

This element specifies an array of @JoinColumn.

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 having the related mapping that is to be overridden.

Default value

None

(b) joinColumns element

Type

JoinColumn[]

Description

This element specifies an array of @JoinColumn.

The definition of the mapped superclass or embedded class is applied as the mapping type.

You can specify the value within the specifiable range of the arrays of @JoinColumn. For details, see 8.12.24 @JoinColumn.

Default value

None