Skip Headers
Oracle Fusion Middleware Developer's Guide for Oracle TopLink
11g Release 1 (11.1.1)

Part Number B32441-03
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

31 Configuring a Relational One-to-One Mapping

This chapter describes the various components that you must configure in order to use a relational one-to-one mapping.

This chapter includes the following sections:

For information on how to configure TopLink mappings options common to two or more mapping types, see Chapter 121, "Configuring a Mapping".

For information on how to create TopLink mappings, see Chapter 120, "Creating a Mapping".

Table 31-1 lists the configurable options for a relational one-to-one mapping.

31.1 Introduction to Relational One-to-One Mapping Configuration

Table 31-1 lists the configurable options for a relational one-to-one mapping.

Table 31-1 Configurable Options for Relational One-to-One Mapping

Option to Configure Oracle JDeveloper
TopLink Workbench

Reference descriptor (see Section 28.4, "Configuring Reference Descriptor")

Supported Supported Supported

Method or direct field access (see Section 121.6, "Configuring Method or Direct Field Accessing at the Mapping Level")

Supported Supported Supported

Read-only mapping (see Section 121.2, "Configuring Read-Only Mappings")

Supported Supported Supported

Private or Independent relationships (see Section 121.7, "Configuring Private or Independent Relationships")

Supported Supported Supported

Batch reading (see Section 28.5, "Configuring Batch Reading")

Supported Supported Supported

Joining (see Section 28.8, "Configuring Joining at the Mapping Level")

Supported Supported Supported

Indirection (lazy loading) (see Section 121.3, "Configuring Indirection (Lazy Loading)")

Supported Supported Supported

Bidirectional relationship (see Section 121.18, "Configuring Bidirectional Relationship")

Supported Supported Supported

Mapping comments (see Section 121.8, "Configuring Mapping Comments")

Supported Supported Supported

Table and field references (see Section 28.7, "Configuring Table and Field References (Foreign and Target Foreign Keys)")

Supported Supported Supported

Example 31-1 shows how to create a one-to-one mapping and add it to a descriptor using Java code.

Example 31-1 One-to-One Mapping

public void customize(ClassDescriptor descriptor) { 
    OneToOneMapping mapping = new OneToOneMapping();  

    // configure mapping

    // add mapping to descriptor

For more information, see the following:

For information on using JPA to configure one-to-one mappings, see "@OneToOne" section of EclipseLink Developer's Guide at