13.3.9 Elements under embeddable
The following elements and attributes apply only to the embeddable class that is the target of the elements and attributes:
- Organization of this subsection
(1) <embeddable>
The embeddable element defines the embeddable class of the persistence unit.
For details on the functionality and attributes, see 8.12 javax.persistence package.
The following table lists the specifiable attributes:
Attribute name |
Type |
Optional/Required |
Description |
---|---|---|---|
class |
xsd:string |
Required |
Class name of the embeddable class. |
access |
orm:access-type |
Optional |
The access attribute defines the access type of the embeddable class. The access attribute overwrites the access type specified in the persistence-unit-defaults element (default element) and entity-mappings element (element valid for the entire persistence unit) provided to the embeddable class.#1 |
metadata-complete#2 |
xsd:boolean |
Optional |
If the metadata-complete attribute is specified in the embeddable element, the annotations specified in the embeddable class and in the fields and properties of the embeddable class are ignored. If metadata-complete is specified in the embeddable element and if the XML element is omitted, the default value is enabled. |
(2) <basic>
The basic element overwrites the mapping specified in fields and properties.
For details on the functionality and attributes, see 8.12 javax.persistence package.
The following table lists the specifiable attributes:
Attribute name |
Type |
Optional/Required |
Description |
---|---|---|---|
name |
xsd:string |
Required |
Methods or fields that map the type. |
fetch |
orm:fetch-type |
Optional |
See the fetch attribute in 8.12.5 @Basic. |
optional |
xsd:boolean |
Optional |
See the optional attribute in 8.12.5 @Basic. |
(3) <transient>
The transient element overwrites the mapping specified in fields and properties.
For details on the functionality and attributes, see 8.12 javax.persistence package.
The following table lists the specifiable attributes:
Attribute name |
Type |
Optional/Required |
Description |
---|---|---|---|
name |
xsd:string |
Required |
Property or field that is non-persistent. |