Red Hat APPLICATION SERVER - JONAS Manual page 119

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

Advertisement

Chapter 8. Developing Entity Beans
foreign-key-jdbc-name
Table 8-7. CMR fields mapping to primary-key-fields: Default values
8.11.4. CMR fields Mapping to Composite Primary-Keys
In the case of composite primary keys, the database mapping should provide the capability to specify
which column of a foreign key corresponds to which column of the primary key. This is the only differ-
ence between relationships based on simple primary keys. For this reason, not all types of relationship
are illustrated below.
8.11.4.1. 1-1 Bidirectional Relationships
8.11.4.1.1. Standard Deployment Descriptor
.....
entity
ejb-name A /ejb-name
.....
prim-key-class p.PkA /prim-key-class
.....
cmp-field
field-name id1A /field-name
/cmp-field
cmp-field
field-name id2A /field-name
/cmp-field
.....
/entity
.....
entity
ejb-name B /ejb-name
.....
prim-key-class p.PkB /prim-key-class
.....
cmp-field
field-name id1B /field-name
/cmp-field
cmp-field
field-name id2B /field-name
/cmp-field
.....
/entity
.....
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
Optional. Default value is the abstract-schema-name of the
destination bean, suffixed by "_" and by its primary-key-field.
B_idb
B --
and
in the example.
A_ida
111

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the APPLICATION SERVER - JONAS and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Application server

Table of Contents