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.
entity-mapping (sun-cmp-mappings.xml)
The following table describes subelements for the cmr-field-mapping element.
Table A–29 cmr-field-mapping Subelements
Element |
Required |
Description |
---|---|---|
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. |
|
one or more |
Specifies the pair of columns that determine the relationship between two database tables. |
|
zero or one |
Specifies the fetch group for this CMR field’s relationship. |