Home / Middleware / Oracle Fusion Middleware Online Documentation Library, 11g Release 1 (11.1.1.2.0) / Developer Guides
Fusion Middleware Developer's Guide for Oracle TopLink
ContentsOpens a new window
Opens a new window
Page 51 of 158

33 Configuring a Relational One-to-Many Mapping

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

This chapter includes the following section:

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

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

Table 33-1Opens a new window lists the configurable options for a relational one-to-many mapping.

33.1 Introduction to Relational One-to-Many Mapping Configuration

Table 33-1Opens a new window lists the configurable options for a relational one-to-many mapping.

Table 33-1 Configurable Options for Relational One-to-Many Mapping

Option Oracle JDeveloper
TopLink Workbench
Java

Reference descriptor (see Section 28.4, "Configuring Reference Descriptor"Opens a new window)

Supported Supported Supported

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

Supported Supported Supported

Read-only mapping (see Section 121.2, "Configuring Read-Only Mappings"Opens a new window)

Supported Supported Supported

Private or Independent relationships (see Section 121.7, "Configuring Private or Independent Relationships"Opens a new window)

Supported Supported Supported

Batch reading (see Section 28.5, "Configuring Batch Reading"Opens a new window)

Supported Supported Supported

Indirection (lazy loading) (see Section 121.3, "Configuring Indirection (Lazy Loading)"Opens a new window)

Supported Supported Supported

Bidirectional relationship (see Section 121.18, "Configuring Bidirectional Relationship"Opens a new window)

Supported Supported Supported

Container policy (see Section 121.14, "Configuring Container Policy"Opens a new window)

Supported Supported Supported

Mapping comments (see Section 121.8, "Configuring Mapping Comments"Opens a new window)

Supported Supported Supported

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

Supported Supported Supported

Query key order (see Section 28.6, "Configuring Query Key Order"Opens a new window)

Supported Supported Supported

Example 33-1Opens a new window shows how to create a one-to-many mapping and add it to a descriptor using Java code.

Example 33-1 One-to-Many Mapping

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

    // configure mapping
    ...   

    // add mapping to descriptor
    descriptor.addMapping(mapping);
}

For more information, see the following:

For information on using JPA to configure one-to-many mappings, see "@OneToMany" section of EclipseLink Developer's Guide at http://wiki.eclipse.org/Introduction_to_EclipseLink_JPA_%28ELUG%29#.40OneToManyOpens a new window.