Hitachi

uCosminexus Application Server Compatibility Guide


8.12.5 @Basic

Organization of this subsection

(1) Description

This annotation indicates the type of mapping to the simplest database column.

This annotation can be applied to the properties or instance variables of the following persistence types:

The applicable targets are method and field.

(2) Element

The following table lists the elements of @Basic:

Element name

Optional/Required

Element description

fetch

Optional

This element specifies the specification value of the fetch strategy.

optional

Optional

This element specifies whether or not a null value can be used in the field or property.

Note that Cosminexus JPA provider does not support this attribute.

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

(a) fetch element

Type

FetchType

Description

This element specifies the specification value of the fetch strategy.

FetchType.EAGER or FetchType.LAZY can be specified.

Furthermore, the fetch attribute is ignored in Cosminexus JPA provider CJPA provider, and the default FetchType.EAGER is usually applied. For details on the fetch attribute, see 9.4.5 Synchronization with the database.

Default value

FetchType.EAGER