Hitachi

uCosminexus Application Server Compatibility Guide


13.3.2 Elements below persistence-unit-metadata

Organization of this subsection

(1) <persistence-unit-metadata>

Specifies the definition related to the entire PersistenceUnit.

(2) <xml-mapping-metadata-complete>

If you specify the xml-mapping-metadata-complete element, the mapping metadata of the persistence unit is controlled and the annotations specified in the class are ignored.

If the xml-mapping-metadata-complete element is specified and the XML element is omitted, the default value is enabled.

Precautions

If you specify this element when an annotation is specified, the KDJE55532-W message is output.

(3) <persistence-unit-defaults>

Specifies the default value of the persistence unit.

(4) <schema>

The schema element applies to all entity classes, table generators, and join tables in the persistence unit.

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

(5) <catalog>

The catalog element applies to all entity classes, table generators, and join tables in the persistence unit.

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

Precautions

The catalog element does not exist in the Oracle and HiRDB databases supported in Cosminexus JPA Provider. Therefore, you cannot specify the catalog element. If specified, an exception will be thrown when the application is executed.

(6) <access>

The access element applies to all the managed classes in the persistence unit.

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

Precautions

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.

(7) <cascade-persist>

The cascade-persist element applies to all the relationships in the persistence unit.

In addition to the values specified in annotations or O/R mapping files, the specification of the cascade-persist element adds the cascade persistence option to all the relationships.

Precautions

If you specify the cascade-persist element, you cannot overwrite and disable.

(8) <entity-listeners>

The entity-listeners element defines the default entity listeners of the persistence unit.

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