Sun GlassFish Enterprise Server v2.1.1 Application Deployment Guide

Subelements

The following table describes subelements for the entity-mapping element.

Table A–46 entity-mapping Subelements

Element 

Required 

Description 

ejb-name

only one 

Specifies the name of the entity bean in the ejb-jar.xml file to which the CMP bean corresponds.

table-name

only one 

Specifies the name of a database table. The table must be present in the database schema file. 

cmp-field-mapping

one or more 

Associates a field with one or more columns to which it maps. 

cmr-field-mapping

zero or more 

A container-managed relationship field has a name and one or more column pairs that define the relationship. 

secondary-table

zero or more 

Describes the relationship between a bean’s primary and secondary table. 

consistency

zero or one 

Specifies container behavior in guaranteeing transactional consistency of the data in the bean.