Skip to content

Latest commit

 

History

History
90 lines (66 loc) · 3.46 KB

Configuring_a_Relational_One-to-One_Mapping_(ELUG).adoc

File metadata and controls

90 lines (66 loc) · 3.46 KB

TOC Special:Whatlinkshere_One-to-One_Mapping_(ELUG)[Related Topics]

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.

[Table 36-1]#

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.

[Example 38-1]# 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.


Category:_EclipseLink_User’s_Guide[Category: EclipseLink User’s Guide] Category:_Release_1[Category: Release 1] Category:_Task[Category: Task] Category:_ORM[Category: ORM]