6.3.2 Elements below persistence-unit-metadata

Organization of this subsection
(1) <persistence-unit-metadata>
(2) <xml-mapping-metadata-complete>
(3) <persistence-unit-defaults>
(4) <schema>
(5) <catalog>
(6) <access>
(7) <cascade-persist>
(8) <entity-listeners>

(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 specifying how to access the entity class fields, see 6.12.3 Specifying how to access the entity class fields in the manual uCosminexus Application Server Common Container Functionality Guide.

(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 about the functionality and attributes, see section 2.7 javax.persistence package in the manual uCosminexus Application Server API Reference Guide.