Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

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

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

Back to the top