Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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 |
m |
||
Line 81: | Line 81: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r11c1-t2" headers="r1c1-t2" align="left" | | | id="r11c1-t2" headers="r1c1-t2" align="left" | | ||
− | + | [[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Table and Field References (Foreign and Target Foreign Keys)|Table and field references]] | |
| headers="r11c1-t2 r1c2-t2" align="left" | | | headers="r11c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 112: | Line 112: | ||
− | 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|@OneToOne]]. |
Revision as of 13:34, 18 December 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.
This table lists the configurable options for a relational one-to-one mapping.
Option to Configure | Workbench | Java |
---|---|---|
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.