Hitachi

uCosminexus Application Server Compatibility Guide


8.12.59 @Table

Organization of this subsection

(1) Description

This annotation specifies the primary table in the entity class.

Even when @Table is not specified explicitly in the entity class, the entity class is handled as if @Table were specified. In such a case, the default value will be applied in each element of @Table.

If more than one table is specified for mapping the entities, use either @SecondaryTable or @SecondaryTables.

The applicable target is class.

(2) Element

The following table lists the elements of @Table:

Element name

Optional/Required

Element description

name

Optional

This element specifies the table name.

catalog

Optional

This element specifies the catalog name of the table.

Note that Cosminexus JPA provider does not support this attribute.

schema

Optional

This element specifies the schema name of the table.

uniqueConstraints

Optional

This element specifies the unique key constraints in the table.

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) name element

Type

String

Description

This element specifies the table name.

The table name that can be specified depends on the database specifications.

Default value

Entity name

(b) schema element

Type

String

Description

This element specifies the schema name of the table.

The schema name that can be specified depends on the database specifications.

Default value

Default schema name of the database used