Configuring a Relational One-to-One Mapping (ELUG)

From Eclipsepedia

Revision as of 07:38, 20 August 2008 by Rick.sapir.oracle.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

For information on how to create EclipseLink mappings, see Creating a Mapping.

This table lists the configurable options for a relational one-to-one mapping.


Option to Configure Workbench Java

Reference descriptor

Supported

Supported

Method or direct field access

Supported

Supported

Read-only mapping

Supported

Supported

Private or Independent relationships

Supported

Supported

Batch reading

Supported

Supported

Joining

Supported

Supported

Indirection (lazy loading)

Supported

Supported

Bidirectional relationship

Supported

Supported

Mapping comments

Supported

Supported

Table and field references

Supported

Supported


This example shows how to create a one-to-one mapping and add it to a descriptor using Java code.

One-to-One Mapping

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

    // configure mapping
    ... 

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


For more information, see the following:


For information on using JPA to configure one-to-one mappings, see @OneToOne.



Copyright Statement