2.7.5 @Basic

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

(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 nameOptional/RequiredElement description
fetchOptionalThis element specifies the specification value of the fetch strategy.
optionalOptionalThis 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 6.4.5 Synchronization with the database in the uCosminexus Application Server Common Container Functionality Guide.
Default value
FetchType.EAGER