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-Many Mapping (ELUG)"
m (New page: <div style="float:right;border:1px solid #000000;padding:5px">__TOC__ Related Topics</div> This section descr...) |
m |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<div style="float:right;border:1px solid #000000;padding:5px">__TOC__ | <div style="float:right;border:1px solid #000000;padding:5px">__TOC__ | ||
[[Special:Whatlinkshere/Configuring a Relational One-to-Many Mapping (ELUG)|Related Topics]]</div> | [[Special:Whatlinkshere/Configuring a Relational One-to-Many Mapping (ELUG)|Related Topics]]</div> | ||
− | |||
− | |||
− | |||
− | |||
For information on how to create EclipseLink mappings, see [[Creating%20a%20Mapping%20(ELUG)|Creating a Mapping]]. | For information on how to create EclipseLink mappings, see [[Creating%20a%20Mapping%20(ELUG)|Creating a Mapping]]. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
This table lists the configurable options for a relational one-to-many mapping. | This table lists the configurable options for a relational one-to-many mapping. | ||
Line 20: | Line 10: | ||
''''' Configurable Options for Relational One-to-Many Mapping''''' | ''''' Configurable Options for Relational One-to-Many Mapping''''' | ||
− | {| class="RuleFormalMax" dir="ltr" title="Configurable Options for Relational One-to-Many Mapping" summary="This table lists the configurable options common to Relational One-to-Many Mapping and categorizes them as Basic and Advanced and indicates if the option can be configured with the | + | {| class="RuleFormalMax" dir="ltr" title="Configurable Options for Relational One-to-Many Mapping" summary="This table lists the configurable options common to Relational One-to-Many Mapping and categorizes them as Basic and Advanced and indicates if the option can be configured with the Workbench, Java, or both." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all" |
|- align="left" valign="top" | |- align="left" valign="top" | ||
! id="r1c1-t2" align="left" valign="bottom" | '''Option''' | ! id="r1c1-t2" align="left" valign="bottom" | '''Option''' | ||
Line 27: | Line 17: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r2c1-t2" headers="r1c1-t2" align="left" | | | id="r2c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring Reference Descriptor]] | + | [[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Reference Descriptor|Configuring Reference Descriptor]] |
| headers="r2c1-t2 r1c2-t2" align="left" | | | headers="r2c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 34: | Line 24: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r3c1-t2" headers="r1c1-t2" align="left" | | | id="r3c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Type Conversion Converter]] | + | [[Configuring%20a%20Mapping%20(ELUG)#Configuring a Type Conversion Converter|Configuring a Type Conversion Converter]] |
| headers="r3c1-t2 r1c2-t2" align="left" | | | headers="r3c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 41: | Line 31: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r4c1-t2" headers="r1c1-t2" align="left" | | | id="r4c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Mapping%20(ELUG)|Configuring Read-Only Mappings]] | + | [[Configuring%20a%20Mapping%20(ELUG)#Configuring Read-Only Mappings|Configuring Read-Only Mappings]] |
| headers="r4c1-t2 r1c2-t2" align="left" | | | headers="r4c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 48: | Line 38: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r5c1-t2" headers="r1c1-t2" align="left" | | | id="r5c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Mapping%20(ELUG)|Configuring Mapping Comments]] | + | [[Configuring%20a%20Mapping%20(ELUG)#Configuring Mapping Comments|Configuring Mapping Comments]] |
| headers="r5c1-t2 r1c2-t2" align="left" | | | headers="r5c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 55: | Line 45: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r6c1-t2" headers="r1c1-t2" align="left" | | | id="r6c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring Batch Reading]] | + | [[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Batch Reading|Configuring Batch Reading]] |
| headers="r6c1-t2 r1c2-t2" align="left" | | | headers="r6c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 62: | Line 52: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r7c1-t2" headers="r1c1-t2" align="left" | | | id="r7c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Mapping%20(ELUG)|Configuring Mapping Comments]] | + | [[Configuring%20a%20Mapping%20(ELUG)#Configuring Mapping Comments|Configuring Mapping Comments]] |
| headers="r7c1-t2 r1c2-t2" align="left" | | | headers="r7c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 69: | Line 59: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r8c1-t2" headers="r1c1-t2" align="left" | | | id="r8c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Mapping%20(ELUG)|Configuring Bidirectional Relationship]] | + | [[Configuring%20a%20Mapping%20(ELUG)#Configuring Bidirectional Relationship|Configuring Bidirectional Relationship]] |
| headers="r8c1-t2 r1c2-t2" align="left" | | | headers="r8c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 76: | Line 66: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r9c1-t2" headers="r1c1-t2" align="left" | | | id="r9c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Mapping%20(ELUG)|Configuring Container Policy]] | + | [[Configuring%20a%20Mapping%20(ELUG)#Configuring Container Policy|Configuring Container Policy]] |
| headers="r9c1-t2 r1c2-t2" align="left" | | | headers="r9c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 83: | Line 73: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r10c1-t2" headers="r1c1-t2" align="left" | | | id="r10c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Mapping%20(ELUG)|Configuring Mapping Comments]] | + | [[Configuring%20a%20Mapping%20(ELUG)#Configuring Mapping Comments|Configuring Mapping Comments]] |
| headers="r10c1-t2 r1c2-t2" align="left" | | | headers="r10c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 90: | Line 80: | ||
|- 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 Joining at the Mapping Level]] | + | [[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Joining at the Mapping Level|Configuring Joining at the Mapping Level]] |
| headers="r11c1-t2 r1c2-t2" align="left" | | | headers="r11c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 97: | Line 87: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r12c1-t2" headers="r1c1-t2" align="left" | | | id="r12c1-t2" headers="r1c1-t2" align="left" | | ||
− | [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring Query Key Order]] | + | [[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Query Key Order|Configuring Query Key Order]] |
| headers="r12c1-t2 r1c2-t2" align="left" | | | headers="r12c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 105: | Line 95: | ||
+ | This example shows how to create a one-to-many mapping and add it to a descriptor using Java code. | ||
− | + | <span id="Example 40-1"></span> | |
+ | ''''' One-to-Many Mapping''''' | ||
− | * [[Introduction%20to%20Relational%20Mappings%20(ELUG)|One-to-Many Mapping]] | + | <pre> |
+ | public void customize(ClassDescriptor descriptor) { | ||
+ | OneToManyMapping mapping = new OneToManyMapping(); | ||
+ | |||
+ | // configure mapping | ||
+ | ... | ||
+ | |||
+ | // add mapping to descriptor | ||
+ | descriptor.addMapping(mapping); | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | For more information, see the following: | ||
+ | * [[Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-Many Mapping|One-to-Many Mapping]] | ||
* [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring a Relational Mapping]] | * [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring a Relational Mapping]] | ||
+ | * [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Mapping]]. | ||
+ | |||
− | For information on using JPA to configure one-to-many mappings, see [[Introduction%20to%20EclipseLink%20JPA%20(ELUG)|@OneToMany]]. | + | For information on using JPA to configure one-to-many mappings, see [[Introduction%20to%20EclipseLink%20JPA%20(ELUG)#@OneToMany|@OneToMany]]. |
Line 120: | Line 127: | ||
[[Category: EclipseLink User's Guide]] | [[Category: EclipseLink User's Guide]] | ||
− | [[Category: | + | [[Category: Release 1]] |
[[Category: Task]] | [[Category: Task]] | ||
+ | [[Category: ORM]] |
Latest revision as of 07:38, 20 August 2008
For information on how to create EclipseLink mappings, see Creating a Mapping.
This table lists the configurable options for a relational one-to-many mapping.
Configurable Options for Relational One-to-Many Mapping
Option | Workbench | Java |
---|---|---|
This example shows how to create a one-to-many mapping and add it to a descriptor using Java code.
One-to-Many Mapping
public void customize(ClassDescriptor descriptor) { OneToManyMapping mapping = new OneToManyMapping(); // configure mapping ... // add mapping to descriptor descriptor.addMapping(mapping); }
For more information, see the following:
For information on using JPA to configure one-to-many mappings, see @OneToMany.