Specifies the mapping a bean to database columns.
sun-cmp-mapping (sun-cmp-mappings.xml)
The following table describes subelements for the entity-mapping element.
Table A–46 entity-mapping Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the name of the entity bean in the ejb-jar.xml file to which the CMP bean corresponds. |
|
only one |
Specifies the name of a database table. The table must be present in the database schema file. |
|
one or more |
Associates a field with one or more columns to which it maps. |
|
zero or more |
A container-managed relationship field has a name and one or more column pairs that define the relationship. |
|
zero or more |
Describes the relationship between a bean’s primary and secondary table. |
|
zero or one |
Specifies container behavior in guaranteeing transactional consistency of the data in the bean. |