Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: cmp-resource
- Next: cmr-field-name

## cmr-field-mapping

A container-managed relationship field has a name and one or more column pairs that define the relationship. There is one `cmr-field-mapping` element for each `cmr-field` element in the `ejb-jar.xml` file. A relationship can also participate in a fetch group.

### Superelements

entity-mapping (`sun-cmp-mappings.xml`)

### Subelements

The following table describes subelements for the `cmr-field-mapping` element.

Table A–28 `cmr-field-mapping` Subelements

Element | Required | Description
--- | --- | ---
cmr-field-name | only one | Specifies the Java identifier of a field. Must match the value of the `cmr-field-name` subelement of the `cmr-field` that is being mapped.
column-pair | one or more | Specifies the pair of columns that determine the relationship between two database tables.
fetched-with | zero or one | Specifies the fetch group for this CMR field’s relationship.

- Previous: cmp-resource
- Next: cmr-field-name

- © 2010, Oracle Corporation and/or its affiliates