Creating One-to-One Mappings

With the TopLink Mapping editor, you can create both unidirectional or bidirectional one-to-one (1:1) mappings between CMP EJBs. These mappings can be either privately owned or independent.


Note: In a bi-directional 1:1 relationship, none of the mappings must be set to read only.

Refer to "Working with One-to-One Mappings" for additional information on this mapping type.

Use this procedure to create a one-to-one mapping.

To create a one-to-one mapping:

  1. In the Structure window, select the attribute to be mapped.
  2. Enter the required information to define this mapping.
  3. Click the One-to-One Mapping - Table Reference tab.

    Figure 6-7 One-to-One Mapping Table Reference Properties

    This figure shows the Table Reference tab of a one-to-one mapping.

  4. Choose the Table Reference and foreign key(s).

Related Topics

About CMP EJB Mappings
Working with CMR Relationship Mappings
Working with One-to-One Mappings

Specifying Advanced Features by Amending the Descriptor

 

Copyright © 1997, 2004, Oracle. All rights reserved.