Chapter 8. Developing Entity Beans
.....
Case 2:
.....
jonas-ejb-relation
ejb-relation-name a-b /ejb-relation-name
jonas-ejb-relationship-role
ejb-relationship-role-name b2a /ejb-relationship-role-name
foreign-key-jdbc-mapping
foreign-key-jdbc-name cfk_ida /foreign-key-jdbc-name
/foreign-key-jdbc-mapping
/jonas-ejb-relationship-role
/jonas-ejb-relation
.....
For the default mapping, the foreign key is in the table of the source bean of the first ejb-relationship-
role of the ejb-relation. In the example, the default mapping corresponds to case 1, since the ejb-
relationship-role
a2b
those of the 1-1 unidirectional relationship.
8.11.3.3. 1-N unidirectional relationships
8.11.3.3.1. Standard Deployment Descriptor
.....
relationships
ejb-relation
ejb-relation-name a-b /ejb-relation-name
ejb-relationship-role
!-- A =
ejb-relationship-role-name a2b /ejb-relationship-role-name
multiplicity One /multiplicity
relationship-role-source
ejb-name A /ejb-name
/relationship-role-source
cmr-field
cmr-field-name b /cmr-field-name
cmr-field-type java.util.Collection /cmr-field-type
/cmr-field
/ejb-relationship-role
ejb-relationship-role
!-- B =
ejb-relationship-role-name b2a /ejb-relationship-role-name
multiplicity Many /multiplicity
relationship-role-source
ejb-name B /ejb-name
/relationship-role-source
/ejb-relationship-role
/ejb-relation
/relationships
.....
is the first defined in the ejb-relation
B --
A --
. Then, the default values are similar to
a-b
103
Need help?
Do you have a question about the APPLICATION SERVER - JONAS and is the answer not in the manual?
Questions and answers