Hitachi

uCosminexus Application Server Compatibility Guide


13.3.1 Elements below entity-mappings

Organization of this subsection

(1) <entity-mappings>

Indicates the root tag.

The following table lists the specifiable attributes:

Table 13‒6: Attributes of <entity-mappings>

Attribute name

Type

Optional/Required

Description

version

orm:versionType

Required

Specifies the JPA version.

(2) <package>

The package element specifies the class package described in the elements and attributes within the same mapping file. In the package element, the class name with a package name is specified for a class, and if the name differs from the package name specified in the package element, the package name is overwritten.

(3) <schema>

The schema element only applies to the entities that are specified within the same mapping file.

The schema element is overwritten by the following elements and attributes:

(4) <catalog>

The catalog element only applies to the entities specified within the same mapping file.

The catalog element is overwritten by the following elements and attributes:

Precautions

Depending upon a database, the catalog element might not exist. The catalog element does not exist in Oracle and HiRDB databases supported by the Cosminexus JPA Provider. Therefore, you cannot specify the catalog element. If specified, an exception will be thrown when you execute the application.

(5) <access>

The access element applies to the classes that are specified and managed within the same mapping file.

The access element is overwritten by the following annotations and attributes:

# Specify PROPERTY or FIELD as the specified value. For details on how to specify access methods for entity class fields, see 9.12.3 Specifying the access methods for the entity class fields.

(6) <sequence-generator>

Adds the sequence generator.

For details on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒7: Attributes of <sequence-generator>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Required

See the name attribute in 8.12.56 @SequenceGenerator.

sequence-name

xsd:string

Optional

See the sequenceName attribute in 8.12.56 @SequenceGenerator.

initial-value

xsd:int

Optional

See the initialValue attribute in 8.12.56 @SequenceGenerator.

allocation-size

xsd:int

Optional

See the allocationSize attribute in 8.12.56 @SequenceGenerator.