Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Configuring a Relational Aggregate Collection Mapping (ELUG)"

m (New page: <div style="float:right;border:1px solid #000000;padding:5px">__TOC__ Related Topics</div> This secti...)
 
m
 
(6 intermediate revisions by 2 users 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 Aggregate Collection Mapping (ELUG)|Related Topics]]</div>
 
[[Special:Whatlinkshere/Configuring a Relational Aggregate Collection Mapping (ELUG)|Related Topics]]</div>
This section describes the various components that you must configure in order to use a relational aggregate collection mapping.
 
  
 +
For information on how to create EclipseLink mappings, see [[Creating%20a%20Mapping%20(ELUG)|Creating a Mapping]].
  
  
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
| align="left" |
 
| align="left" |
'''Note'''<nowiki>:</nowiki> To use a relational aggregate collection mapping with Workbench, you must use an amendment method (see [[Configuring%20a%20Descriptor%20(ELUG)#Configuring Amendment Methods|Configuring Amendment Methods]]).
+
'''Note'''<nowiki>:</nowiki> To use a relational aggregate collection mapping with Workbench, you must use [[Configuring%20a%20Descriptor%20(ELUG)#Configuring Amendment Methods|an amendment method]].
 
|}
 
|}
  
 
 
For information on how to configure EclipseLink mappings options common to two or more mapping types, see [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Mapping]].
 
 
For information on how to create EclipseLink mappings, see [[Creating%20a%20Mapping%20(ELUG)|Creating a Mapping]].
 
 
[[#Table 40-1|Configurable Options for Relational Aggregate Collection Mapping]] lists the configurable options for a relational aggregate collection mapping.
 
 
 
 
==Introduction to Relational Aggregate Collection Mapping Configuration==
 
  
 
This table lists the configurable options for a relational aggregate collection mapping.
 
This table lists the configurable options for a relational aggregate collection mapping.
Line 26: Line 15:
  
 
<span id="Table 40-1"></span>
 
<span id="Table 40-1"></span>
''''' Configurable Options for Relational Aggregate Collection Mapping'''''
 
  
{| class="RuleFormalMax" dir="ltr" title="Configurable Options for Relational Aggregate Collection Mapping" summary="This table lists the configurable options common to Relational Aggregate Collection Mapping and categorizes them as Basic and Advanced and indicates if the option can be configured with the TopLink Workbench, Java, or both." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
+
{| class="RuleFormalMax" dir="ltr" title="Configurable Options for Relational Aggregate Collection Mapping" summary="This table lists the configurable options common to Relational Aggregate Collection 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-t3" align="left" valign="bottom" | '''Option'''
 
! id="r1c1-t3" align="left" valign="bottom" | '''Option'''
Line 35: Line 23:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r2c1-t3" headers="r1c1-t3" align="left" |
 
| id="r2c1-t3" headers="r1c1-t3" align="left" |
Database field (see [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring a Database Field]])
+
[[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring a Database Field|Database field ]]
 
| headers="r2c1-t3 r1c2-t3" align="left" |
 
| headers="r2c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]
 
[[Image:unsupport.gif|Unsupported]]
Line 42: Line 30:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r3c1-t3" headers="r1c1-t3" align="left" |
 
| id="r3c1-t3" headers="r1c1-t3" align="left" |
Reference descriptor (see [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring Reference Descriptor]])
+
[[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Reference Descriptor|Reference descriptor ]]
 
| headers="r3c1-t3 r1c2-t3" align="left" |
 
| headers="r3c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]
 
[[Image:unsupport.gif|Unsupported]]
Line 49: Line 37:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r4c1-t3" headers="r1c1-t3" align="left" |
 
| id="r4c1-t3" headers="r1c1-t3" align="left" |
Container policy (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring Mapping Comments]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring Container Policy|Container policy ]]
 
| headers="r4c1-t3 r1c2-t3" align="left" |
 
| headers="r4c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]
 
[[Image:unsupport.gif|Unsupported]]
Line 56: Line 44:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r5c1-t3" headers="r1c1-t3" align="left" |
 
| id="r5c1-t3" headers="r1c1-t3" align="left" |
Method or direct field access (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Type Conversion Converter]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring Method or Direct Field Accessing at the Mapping Level|Method or direct field access ]]
 
| headers="r5c1-t3 r1c2-t3" align="left" |
 
| headers="r5c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]
 
[[Image:unsupport.gif|Unsupported]]
Line 63: Line 51:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r6c1-t3" headers="r1c1-t3" align="left" |
 
| id="r6c1-t3" headers="r1c1-t3" align="left" |
Read-only mapping (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring Read-Only Mappings]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring Read-Only Mappings|Read-only mapping ]]
 
| headers="r6c1-t3 r1c2-t3" align="left" |
 
| headers="r6c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]
 
[[Image:unsupport.gif|Unsupported]]
Line 70: Line 58:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r7c1-t3" headers="r1c1-t3" align="left" |
 
| id="r7c1-t3" headers="r1c1-t3" align="left" |
Batch reading (see [[Configuring%20a%20Relational%20Mapping%20(ELUG)|Configuring Batch Reading]])
+
[[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Batch Reading|Batch reading ]]
 
| headers="r7c1-t3 r1c2-t3" align="left" |
 
| headers="r7c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]
 
[[Image:unsupport.gif|Unsupported]]
Line 77: Line 65:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r8c1-t3" headers="r1c1-t3" align="left" |
 
| id="r8c1-t3" headers="r1c1-t3" align="left" |
Bidirectional relationship (see [[Configuring%20a%20Mapping%20(ELUG)|Configuring Bidirectional Relationship]])
+
[[Configuring%20a%20Mapping%20(ELUG)#Configuring Bidirectional Relationship|Bidirectional relationship ]]
 
| headers="r8c1-t3 r1c2-t3" align="left" |
 
| headers="r8c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]
 
[[Image:unsupport.gif|Unsupported]]
Line 84: Line 72:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r9c1-t3" headers="r1c1-t3" align="left" |
 
| id="r9c1-t3" headers="r1c1-t3" align="left" |
[[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Query Key Order|Configuring Query Key Order]]
+
[[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Query Key Order|Query key order ]]
 
| headers="r9c1-t3 r1c2-t3" align="left" |
 
| headers="r9c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]
 
[[Image:unsupport.gif|Unsupported]]
Line 91: Line 79:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r10c1-t3" headers="r1c1-t3" align="left" |
 
| id="r10c1-t3" headers="r1c1-t3" align="left" |
[[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Joining at the Mapping Level|Configuring Joining at the Mapping Level]]
+
[[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Table and Field References (Foreign and Target Foreign Keys)|Configuring Configuring Table and Field References]]
 
| headers="r10c1-t3 r1c2-t3" align="left" |
 
| headers="r10c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]
 
[[Image:unsupport.gif|Unsupported]]
Line 99: Line 87:
  
  
 +
This example shows how to create a aggregate collection mapping and add it to a descriptor using Java code.
  
For more information, see the following:
+
<span id="Example 42-1"></span>
 +
''''' Aggregate Collection Mapping'''''
  
 +
<pre>
 +
public void customize(ClassDescriptor descriptor) {
 +
    AggregateCollectionMapping mapping = new AggregateCollectionMapping(); 
 +
 +
    // configure mapping
 +
    ...
 +
 +
    // add mapping to descriptor
 +
    descriptor.addMapping(mapping);
 +
}
 +
</pre>
 +
 +
 +
For more information, see the following:
 
* [[Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate Collection Mapping|Aggregate Collection Mapping]]
 
* [[Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate Collection Mapping|Aggregate Collection 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]].
  
  
Line 111: Line 116:
  
 
[[Category: EclipseLink User's Guide]]
 
[[Category: EclipseLink User's Guide]]
[[Category: Draft]]
+
[[Category: Release 1]]
 
[[Category: Task]]
 
[[Category: Task]]
 +
[[Category: ORM]]

Latest revision as of 07:35, 20 August 2008

For information on how to create EclipseLink mappings, see Creating a Mapping.


Note: To use a relational aggregate collection mapping with Workbench, you must use an amendment method.


This table lists the configurable options for a relational aggregate collection mapping.


Option Workbench Java

Database field

Unsupported

Supported

Reference descriptor

Unsupported

Supported

Container policy

Unsupported

Supported

Method or direct field access

Unsupported

Supported

Read-only mapping

Unsupported

Supported

Batch reading

Unsupported

Supported

Bidirectional relationship

Unsupported

Supported

Query key order

Unsupported

Supported

Configuring Configuring Table and Field References

Unsupported

Supported


This example shows how to create a aggregate collection mapping and add it to a descriptor using Java code.

Aggregate Collection Mapping

public void customize(ClassDescriptor descriptor) { 
    AggregateCollectionMapping mapping = new AggregateCollectionMapping();  

    // configure mapping
    ... 

    // add mapping to descriptor
    descriptor.addMapping(mapping);
}


For more information, see the following:



Copyright Statement

Back to the top