Chapter 8. Developing Entity Beans
t_B
c_idB
...
In this case, the foreign key must be in the table of the bean which is on the "many" side of the
relationship (that is, in table of the source bean of the relationship role with multiplicity many), t_A.
8.11.3.5.3. JOnAS Deployment Descriptor
.....
jonas-ejb-relation
ejb-relation-name a-b /ejb-relation-name
jonas-ejb-relationship-role
ejb-relationship-role-name a2b /ejb-relationship-role-name
foreign-key-jdbc-mapping
foreign-key-jdbc-name cfk_idb /foreign-key-jdbc-name
/foreign-key-jdbc-mapping
/jonas-ejb-relationship-role
/jonas-ejb-relation
.....
jonas-ejb-relation
foreign-key-jdbc-name
Table 8-5. N-1 unidirectional relationships: Default values
8.11.3.6. N-M Unidirectional Relationships
8.11.3.6.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 Many /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
Optional
Optional. Default value is the abstract-schema-name of the
destination bean of the "one" side of the relationship (that is,
the source bean of the relationship role with multiplicity one)
suffixed by "_" and by its primary-key-field.
example.
B --
107
in the
B_idb
Need help?
Do you have a question about the APPLICATION SERVER - JONAS and is the answer not in the manual?
Questions and answers