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.
Difference between revisions of "Configuring a Relational One-to-One Mapping (ELUG)"
m (→Introduction to Relational One-to-One Mapping Configuration) |
m (→Introduction to Relational One-to-One Mapping Configuration) |
||
Line 95: | Line 95: | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
|} | |} | ||
+ | |||
This example shows how to create a one-to-one mapping and add it to a descriptor using Java code. | This example shows how to create a one-to-one mapping and add it to a descriptor using Java code. | ||
Line 112: | Line 113: | ||
} | } | ||
</pre> | </pre> | ||
− | |||
For more information, see the following: | For more information, see the following: | ||
Line 119: | Line 119: | ||
* [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring a Relational Mapping]] | * [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring a Relational Mapping]] | ||
* [[Creating%20and%20Configuring%20Mappings%20(ELUG)|Creating and Configuring Mappings]] | * [[Creating%20and%20Configuring%20Mappings%20(ELUG)|Creating and Configuring Mappings]] | ||
+ | |||
For information on using JPA to configure one-to-one mappings, see [[Introduction%20to%20EclipseLink%20JPA%20(ELUG)|@OneToOne]]. | For information on using JPA to configure one-to-one mappings, see [[Introduction%20to%20EclipseLink%20JPA%20(ELUG)|@OneToOne]]. |
Revision as of 15:15, 29 November 2007
This section describes the various components that you must configure in order to use a relational one-to-one mapping.
For information on how to configure EclipseLink mappings options common to two or more mapping types, see Configuring a Mapping.
For information on how to create EclipseLink mappings, see Creating a Mapping.
Configurable Options for Relational One-to-One Mapping lists the configurable options for a relational one-to-one mapping.
Introduction to Relational One-to-One Mapping Configuration
This table lists the configurable options for a relational one-to-one mapping.
Configurable Options for Relational One-to-One Mapping
Option to Configure | Workbench | Java |
---|---|---|
Reference descriptor (see Configuring Reference Descriptor) |
||
Method or direct field access (see Configuring a Type Conversion Converter) |
||
Read-only mapping (see Configuring Read-Only Mappings) |
||
Private or Independent relationships (see Configuring Mapping Comments) |
||
Batch reading (see Configuring Batch Reading) |
||
Joining (see Configuring Joining at the Mapping Level) |
||
Indirection (lazy loading) (see Configuring Mapping Comments) |
||
Bidirectional relationship (see Configuring Bidirectional Relationship) |
||
Mapping comments (see Configuring Mapping Comments) |
||
Table and field references (see Configuring Joining at the Mapping Level) |
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.