Red Hat APPLICATION SERVER - JONAS Manual page 109

Jonas
Hide thumbs Also See for APPLICATION SERVER - JONAS:
Table of Contents

Advertisement

Chapter 8. Developing Entity Beans
.....
/jonas-entity
.....
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
.....
foreign-key-jdbc-name
the relationship-role.
In this example, where the destination bean has a primary-key-field, it is possible to deduce that this
foreign-key-jdbc-name column is to be associated with the column of this primary-key-field in the
table of the destination bean.
jonas-ejb-relation
foreign-key-jdbc-name
Table 8-2. 1-1 unidirectional relationships: Default values
8.11.3.2. 1-1 bidirectional relationships
In contrast to 1-1 unidirectional relationships, there is a CMR field in both of the beans, thus making
two types of mapping possible.
8.11.3.2.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
/ejb-relationship-role
ejb-relationship-role
!-- B =
ejb-relationship-role-name b2a /ejb-relationship-role-name
multiplicity One /multiplicity
relationship-role-source
ejb-name B /ejb-name
is the column name of the foreign key in the table of the source bean of
Optional
Optional. Default value is the abstract-schema-name of the
destination bean, suffixed by "_" and by its primary-key-field.
in the example.
B_idb
B --
A --
101

Advertisement

Table of Contents
loading

This manual is also suitable for:

Application server

Table of Contents