Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Configuring an Object-Relational Data Type Mapping (ELUG)"

m
m
Line 3: Line 3:
 
This section describes how to configure an object-relational data type mapping.
 
This section describes how to configure an object-relational data type mapping.
  
For information on how to configure EclipseLink mappings options common to two or more mapping types, see [Configuring%20a%20Mapping%20(ELUG).htm#CEGFEFJG Chapter 117, "Configuring a Mapping"].
+
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).htm#CBBHHHJC Chapter 116, "Creating a Mapping"].
+
For information on how to create EclipseLink mappings, see [[Creating%20a%20Mapping%20(ELUG)#Creating a Mapping]].
  
  
Line 11: Line 11:
 
==Introduction to Object-Relational Data Type Mapping Configuration==
 
==Introduction to Object-Relational Data Type Mapping Configuration==
  
[[#Table 50-1] lists the types of object-relational data type mappings that you can configure and provides a cross-reference to the type-specific chapter that lists the configurable options supported by that type.
+
This table lists the types of object-relational data type mappings that you can configure and provides a cross-reference to the type-specific chapter that lists the configurable options supported by that type.
  
  
 
+
<span id="Table 50-1"></span>
'''''Table 50-1 Configuring Object-Relational Data Type Mappings'''''
+
''''' Configuring Object-Relational Data Type Mappings'''''
  
 
{| class="HRuleFormalMax" dir="ltr" title="Configuring Object-Relational Data Type Mappings" summary="This table provides a cross-reference to additional configuration options for each specific object-relational mapping type." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows"
 
{| class="HRuleFormalMax" dir="ltr" title="Configuring Object-Relational Data Type Mappings" summary="This table provides a cross-reference to additional configuration options for each specific object-relational mapping type." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows"
Line 23: Line 23:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r2c1-t2" headers="r1c1-t2" align="left" |
 
| id="r2c1-t2" headers="r1c1-t2" align="left" |
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABJHEJF Object-Relational Data Type Structure Mapping])
+
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])
 
| headers="r2c1-t2 r1c2-t2" align="left" |
 
| headers="r2c1-t2 r1c2-t2" align="left" |
[Configuring%20an%20Object-Relational%20Data%20Type%20Structure%20Mapping%20(ELUG).htm#CHDBHDIF Chapter 46, "Configuring an Object-Relational Data Type Structure Mapping"]<br>
+
[Configuring%20an%20Object-Relational%20Data%20Type%20Structure%20Mapping%20(ELUG)#Chapter 46, "Configuring an Object-Relational Data Type Structure Mapping"]<br>
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r3c1-t2" headers="r1c1-t2" align="left" |
 
| id="r3c1-t2" headers="r1c1-t2" align="left" |
Object-relational data type reference mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABGBBGG Object-Relational Data Type Reference Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Reference Mapping|Object-relational data type reference mapping ]]
 
| headers="r3c1-t2 r1c2-t2" align="left" |
 
| headers="r3c1-t2 r1c2-t2" align="left" |
[Configuring%20an%20Object-Relational%20Data%20Type%20Reference%20Mapping%20(ELUG).htm#CHDEBAAA Chapter 47, "Configuring an Object-Relational Data Type Reference Mapping"]<br>
+
[Configuring%20an%20Object-Relational%20Data%20Type%20Reference%20Mapping%20(ELUG)#Chapter 47, "Configuring an Object-Relational Data Type Reference Mapping"]<br>
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r4c1-t2" headers="r1c1-t2" align="left" |
 
| id="r4c1-t2" headers="r1c1-t2" align="left" |
Object-relational data type array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBAEH Object-Relational Data Type Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Array Mapping|Object-relational data type array mapping ]]
 
| headers="r4c1-t2 r1c2-t2" align="left" |
 
| headers="r4c1-t2 r1c2-t2" align="left" |
[Configuring%20an%20Object-Relational%20Data%20Type%20Array%20Mapping%20(ELUG).htm#CHDGGIDH Chapter 48, "Configuring an Object-Relational Data Type Array Mapping"]<br>
+
[Configuring%20an%20Object-Relational%20Data%20Type%20Array%20Mapping%20(ELUG)#Chapter 48, "Configuring an Object-Relational Data Type Array Mapping"]<br>
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r5c1-t2" headers="r1c1-t2" align="left" |
 
| id="r5c1-t2" headers="r1c1-t2" align="left" |
Object-relational data type object array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBGDG Object-Relational Data Type Object Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Object Array Mapping|Object-relational data type object array mapping]]
 
| headers="r5c1-t2 r1c2-t2" align="left" |
 
| headers="r5c1-t2 r1c2-t2" align="left" |
[Configuring%20an%20Object-Relational%20Data%20Type%20Object%20Array%20Mapping%20(ELUG).htm#CHDDDJFD Chapter 49, "Configuring an Object-Relational Data Type Object Array Mapping"]<br>
+
[Configuring%20an%20Object-Relational%20Data%20Type%20Object%20Array%20Mapping%20(ELUG)#Chapter 49, "Configuring an Object-Relational Data Type Object Array Mapping"]<br>
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r6c1-t2" headers="r1c1-t2" align="left" |
 
| id="r6c1-t2" headers="r1c1-t2" align="left" |
Object-relational data type nested table mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIFDFC Object-Relational Data Type Nested Table Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Nested Table Mapping|Object-relational data type nested table mapping ]])
 
| headers="r6c1-t2 r1c2-t2" align="left" |
 
| headers="r6c1-t2 r1c2-t2" align="left" |
[Configuring%20an%20Object-Relational%20Data%20Type%20Nested%20Table%20Mapping%20(ELUG).htm#CHDHADED Chapter 51, "Configuring an Object-Relational Data Type Nested Table Mapping"]<br>
+
[Configuring%20an%20Object-Relational%20Data%20Type%20Nested%20Table%20Mapping%20(ELUG)#Chapter 51, "Configuring an Object-Relational Data Type Nested Table Mapping"]<br>
 
|}
 
|}
  
Line 52: Line 52:
 
For more information, see the following:
 
For more information, see the following:
  
* [Introduction%20to%20Mappings%20(ELUG).htm#CHDFEJIJ Chapter 16, "Introduction to Mappings"]
+
* [Introduction%20to%20Mappings%20(ELUG)#Chapter 16, "Introduction to Mappings"]
* [Introduction%20to%20Relational%20Mappings%20(ELUG).htm#CHDCBEDB Chapter 32, "Introduction to Relational Mappings"]
+
* [Introduction%20to%20Relational%20Mappings%20(ELUG)#Chapter 32, "Introduction to Relational Mappings"]
  
  
Line 59: Line 59:
 
==Configuring Common Object-Relational Data Type Mapping Options==
 
==Configuring Common Object-Relational Data Type Mapping Options==
  
[[#Table 50-2] lists the configurable options shared by two or more object-relational data type mapping types. In addition to the configurable options described here, you must also configure the options described for the specific object-relational data type mapping types (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABEJHHF Object-Relational Data Type Mapping Types]), as shown in [[#Table 50-1].
+
[[#Table 50-2] lists the configurable options shared by two or more object-relational data type mapping types. In addition to the configurable options described here, you must also configure the options described for the specific object-relational data type mapping types (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Mapping Types]), as shown in [[#Table 50-1].
  
  
Line 109: Line 109:
 
|- 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 (see [Configuring%20a%20Mapping%20(ELUG).htm#CEGDDEDA Configuring Read-Only Mappings])
+
Read-only (see [Configuring%20a%20Mapping%20(ELUG)#Configuring Read-Only Mappings])
 
| headers="r6c1-t3 r1c2-t3" align="left" |
 
| headers="r6c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]<br>
 
[[Image:unsupport.gif|Unsupported]]<br>
Line 118: Line 118:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r7c1-t3" headers="r1c1-t3" align="left" |
 
| id="r7c1-t3" headers="r1c1-t3" align="left" |
Method or direct field access (see [Configuring%20a%20Mapping%20(ELUG).htm#CEGCFIGE Configuring Method or Direct Field Accessing at the Mapping Level])
+
Method or direct field access (see [Configuring%20a%20Mapping%20(ELUG)#Configuring Method or Direct Field Accessing at the Mapping Level])
 
| headers="r7c1-t3 r1c2-t3" align="left" |
 
| headers="r7c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]<br>
 
[[Image:unsupport.gif|Unsupported]]<br>
Line 127: Line 127:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r8c1-t3" headers="r1c1-t3" align="left" |
 
| id="r8c1-t3" headers="r1c1-t3" align="left" |
Indirection (lazy loading) (see [Configuring%20a%20Mapping%20(ELUG).htm#CEGDDEEA Configuring Indirection (Lazy Loading)])
+
Indirection (lazy loading) (see [Configuring%20a%20Mapping%20(ELUG)#Configuring Indirection (Lazy Loading)])
 
| headers="r8c1-t3 r1c2-t3" align="left" |
 
| headers="r8c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]<br>
 
[[Image:unsupport.gif|Unsupported]]<br>
Line 136: Line 136:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r9c1-t3" headers="r1c1-t3" align="left" |
 
| id="r9c1-t3" headers="r1c1-t3" align="left" |
Container policy (see [Configuring%20a%20Mapping%20(ELUG).htm#CHDFGJAI Configuring Container Policy])
+
Container policy (see [Configuring%20a%20Mapping%20(ELUG)#Configuring Container Policy])
 
| headers="r9c1-t3 r1c2-t3" align="left" |
 
| headers="r9c1-t3 r1c2-t3" align="left" |
 
[[Image:unsupport.gif|Unsupported]]<br>
 
[[Image:unsupport.gif|Unsupported]]<br>
Line 164: Line 164:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r2c1-t4" headers="r1c1-t4" align="left" |
 
| id="r2c1-t4" headers="r1c1-t4" align="left" |
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABJHEJF Object-Relational Data Type Structure Mapping])
+
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])
 
| headers="r2c1-t4 r1c2-t4" align="left" |
 
| headers="r2c1-t4 r1c2-t4" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 171: Line 171:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r3c1-t4" headers="r1c1-t4" align="left" |
 
| id="r3c1-t4" headers="r1c1-t4" align="left" |
Object-relational data type reference mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABGBBGG Object-Relational Data Type Reference Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Reference Mapping|Object-relational data type reference mapping ]]
 
| headers="r3c1-t4 r1c2-t4" align="left" |
 
| headers="r3c1-t4 r1c2-t4" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 178: Line 178:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r4c1-t4" headers="r1c1-t4" align="left" |
 
| id="r4c1-t4" headers="r1c1-t4" align="left" |
Object-relational data type array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBAEH Object-Relational Data Type Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Array Mapping|Object-relational data type array mapping ]]
 
| headers="r4c1-t4 r1c2-t4" align="left" |
 
| headers="r4c1-t4 r1c2-t4" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 185: Line 185:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r5c1-t4" headers="r1c1-t4" align="left" |
 
| id="r5c1-t4" headers="r1c1-t4" align="left" |
Object-relational data type object array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBGDG Object-Relational Data Type Object Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Object Array Mapping|Object-relational data type object array mapping]]
 
| headers="r5c1-t4 r1c2-t4" align="left" |
 
| headers="r5c1-t4 r1c2-t4" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 192: Line 192:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r6c1-t4" headers="r1c1-t4" align="left" |
 
| id="r6c1-t4" headers="r1c1-t4" align="left" |
Object-relational data type nested table mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIFDFC Object-Relational Data Type Nested Table Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Nested Table Mapping|Object-relational data type nested table mapping ]])
 
| headers="r6c1-t4 r1c2-t4" align="left" |
 
| headers="r6c1-t4 r1c2-t4" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 223: Line 223:
  
  
For more information, see the ''[olinkSRC%20JITAR EclipseLink API Reference]''.
+
For more information, see the ''EclipseLink API Reference''.
  
  
Line 244: Line 244:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r2c1-t5" headers="r1c1-t5" align="left" |
 
| id="r2c1-t5" headers="r1c1-t5" align="left" |
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABJHEJF Object-Relational Data Type Structure Mapping])
+
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])
 
| headers="r2c1-t5 r1c2-t5" align="left" |
 
| headers="r2c1-t5 r1c2-t5" align="left" |
 
[[Image:unsupport.gif|Supported]]<br>
 
[[Image:unsupport.gif|Supported]]<br>
Line 251: Line 251:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r3c1-t5" headers="r1c1-t5" align="left" |
 
| id="r3c1-t5" headers="r1c1-t5" align="left" |
Object-relational data type reference mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABGBBGG Object-Relational Data Type Reference Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Reference Mapping|Object-relational data type reference mapping ]]
 
| headers="r3c1-t5 r1c2-t5" align="left" |
 
| headers="r3c1-t5 r1c2-t5" align="left" |
 
[[Image:unsupport.gif|Supported]]<br>
 
[[Image:unsupport.gif|Supported]]<br>
Line 258: Line 258:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r4c1-t5" headers="r1c1-t5" align="left" |
 
| id="r4c1-t5" headers="r1c1-t5" align="left" |
Object-relational data type array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBAEH Object-Relational Data Type Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Array Mapping|Object-relational data type array mapping ]]
 
| headers="r4c1-t5 r1c2-t5" align="left" |
 
| headers="r4c1-t5 r1c2-t5" align="left" |
 
[[Image:unsupport.gif|Supported]]<br>
 
[[Image:unsupport.gif|Supported]]<br>
Line 265: Line 265:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r5c1-t5" headers="r1c1-t5" align="left" |
 
| id="r5c1-t5" headers="r1c1-t5" align="left" |
Object-relational data type object array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBGDG Object-Relational Data Type Object Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Object Array Mapping|Object-relational data type object array mapping]]
 
| headers="r5c1-t5 r1c2-t5" align="left" |
 
| headers="r5c1-t5 r1c2-t5" align="left" |
 
[[Image:unsupport.gif|Supported]]<br>
 
[[Image:unsupport.gif|Supported]]<br>
Line 272: Line 272:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r6c1-t5" headers="r1c1-t5" align="left" |
 
| id="r6c1-t5" headers="r1c1-t5" align="left" |
Object-relational data type nested table mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIFDFC Object-Relational Data Type Nested Table Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Nested Table Mapping|Object-relational data type nested table mapping ]])
 
| headers="r6c1-t5 r1c2-t5" align="left" |
 
| headers="r6c1-t5 r1c2-t5" align="left" |
 
[[Image:unsupport.gif|Supported]]<br>
 
[[Image:unsupport.gif|Supported]]<br>
Line 304: Line 304:
  
  
For more information, see the ''[olinkSRC%20JITAR EclipseLink API Reference]''.
+
For more information, see the ''EclipseLink API Reference''.
  
  
Line 325: Line 325:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r2c1-t6" headers="r1c1-t6" align="left" |
 
| id="r2c1-t6" headers="r1c1-t6" align="left" |
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABJHEJF Object-Relational Data Type Structure Mapping])
+
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])
 
| headers="r2c1-t6 r1c2-t6" align="left" |
 
| headers="r2c1-t6 r1c2-t6" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 332: Line 332:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r3c1-t6" headers="r1c1-t6" align="left" |
 
| id="r3c1-t6" headers="r1c1-t6" align="left" |
Object-relational data type reference mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABGBBGG Object-Relational Data Type Reference Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Reference Mapping|Object-relational data type reference mapping ]]
 
| headers="r3c1-t6 r1c2-t6" align="left" |
 
| headers="r3c1-t6 r1c2-t6" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 339: Line 339:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r4c1-t6" headers="r1c1-t6" align="left" |
 
| id="r4c1-t6" headers="r1c1-t6" align="left" |
Object-relational data type array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBAEH Object-Relational Data Type Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Array Mapping|Object-relational data type array mapping ]]
 
| headers="r4c1-t6 r1c2-t6" align="left" |
 
| headers="r4c1-t6 r1c2-t6" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 346: Line 346:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r5c1-t6" headers="r1c1-t6" align="left" |
 
| id="r5c1-t6" headers="r1c1-t6" align="left" |
Object-relational data type object array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBGDG Object-Relational Data Type Object Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Object Array Mapping|Object-relational data type object array mapping]]
 
| headers="r5c1-t6 r1c2-t6" align="left" |
 
| headers="r5c1-t6 r1c2-t6" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 353: Line 353:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r6c1-t6" headers="r1c1-t6" align="left" |
 
| id="r6c1-t6" headers="r1c1-t6" align="left" |
Object-relational data type nested table mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIFDFC Object-Relational Data Type Nested Table Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Nested Table Mapping|Object-relational data type nested table mapping ]])
 
| headers="r6c1-t6 r1c2-t6" align="left" |
 
| headers="r6c1-t6 r1c2-t6" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 385: Line 385:
  
  
For more information, see the ''[olinkSRC%20JITAR EclipseLink API Reference]''.
+
For more information, see the ''EclipseLink API Reference''.
  
  
Line 407: Line 407:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r2c1-t7" headers="r1c1-t7" align="left" |
 
| id="r2c1-t7" headers="r1c1-t7" align="left" |
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABJHEJF Object-Relational Data Type Structure Mapping])
+
Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])
 
| headers="r2c1-t7 r1c2-t7" align="left" |
 
| headers="r2c1-t7 r1c2-t7" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 416: Line 416:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r3c1-t7" headers="r1c1-t7" align="left" |
 
| id="r3c1-t7" headers="r1c1-t7" align="left" |
Object-relational data type reference mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABGBBGG Object-Relational Data Type Reference Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Reference Mapping|Object-relational data type reference mapping ]]
 
| headers="r3c1-t7 r1c2-t7" align="left" |
 
| headers="r3c1-t7 r1c2-t7" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 425: Line 425:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r4c1-t7" headers="r1c1-t7" align="left" |
 
| id="r4c1-t7" headers="r1c1-t7" align="left" |
Object-relational data type array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBAEH Object-Relational Data Type Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Array Mapping|Object-relational data type array mapping ]]
 
| headers="r4c1-t7 r1c2-t7" align="left" |
 
| headers="r4c1-t7 r1c2-t7" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 434: Line 434:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r5c1-t7" headers="r1c1-t7" align="left" |
 
| id="r5c1-t7" headers="r1c1-t7" align="left" |
Object-relational data type object array mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIBGDG Object-Relational Data Type Object Array Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Object Array Mapping|Object-relational data type object array mapping]]
 
| headers="r5c1-t7 r1c2-t7" align="left" |
 
| headers="r5c1-t7 r1c2-t7" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 443: Line 443:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r6c1-t7" headers="r1c1-t7" align="left" |
 
| id="r6c1-t7" headers="r1c1-t7" align="left" |
Object-relational data type nested table mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG).htm#BABIFDFC Object-Relational Data Type Nested Table Mapping])
+
[[Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Nested Table Mapping|Object-relational data type nested table mapping ]])
 
| headers="r6c1-t7 r1c2-t7" align="left" |
 
| headers="r6c1-t7 r1c2-t7" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 453: Line 453:
  
 
<br>
 
<br>
 +
 +
  
 
===How to Configure Structure Name Using Java===
 
===How to Configure Structure Name Using Java===
Line 458: Line 460:
 
Use the object-relational data type mapping method <tt>setStructureName</tt> to specify the structure of the attribute being mapped.
 
Use the object-relational data type mapping method <tt>setStructureName</tt> to specify the structure of the attribute being mapped.
  
[[#Example 50-4] shows how to use this method with an <tt>ObjectArrayMapping</tt> that maps the <tt>Employee</tt> class attribute <tt>phones</tt> to database field name <tt>PHONE_NUMBERS</tt> of type <tt>PHONE_ARRAY_TYPE</tt>.
+
This example shows how to use this method with an <tt>ObjectArrayMapping</tt> that maps the <tt>Employee</tt> class attribute <tt>phones</tt> to database field name <tt>PHONE_NUMBERS</tt> of type <tt>PHONE_ARRAY_TYPE</tt>.
  
  
 
+
<span id="Example 50-4"></span>
'''''Example 50-4 Configuring Structure Name in Java'''''
+
''''' Configuring Structure Name in Java'''''
 
+
+
 
  public void customize(ClassDescriptor descriptor) {  
 
  public void customize(ClassDescriptor descriptor) {  
 
     ObjectArrayMapping phonesMapping = new ObjectArrayMapping();
 
     ObjectArrayMapping phonesMapping = new ObjectArrayMapping();
Line 478: Line 478:
  
  
For more information, see the ''[olinkSRC%20JITAR EclipseLink API Reference]''.
+
For more information, see the ''EclipseLink API Reference''.
  
  

Revision as of 12:51, 30 November 2007

This section describes how to configure an object-relational data type 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 (ELUG)#Creating a Mapping.


Introduction to Object-Relational Data Type Mapping Configuration

This table lists the types of object-relational data type mappings that you can configure and provides a cross-reference to the type-specific chapter that lists the configurable options supported by that type.


Configuring Object-Relational Data Type Mappings

If you are creating... See Also...

Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])

[Configuring%20an%20Object-Relational%20Data%20Type%20Structure%20Mapping%20(ELUG)#Chapter 46, "Configuring an Object-Relational Data Type Structure Mapping"]

Object-relational data type reference mapping

[Configuring%20an%20Object-Relational%20Data%20Type%20Reference%20Mapping%20(ELUG)#Chapter 47, "Configuring an Object-Relational Data Type Reference Mapping"]

Object-relational data type array mapping

[Configuring%20an%20Object-Relational%20Data%20Type%20Array%20Mapping%20(ELUG)#Chapter 48, "Configuring an Object-Relational Data Type Array Mapping"]

Object-relational data type object array mapping

[Configuring%20an%20Object-Relational%20Data%20Type%20Object%20Array%20Mapping%20(ELUG)#Chapter 49, "Configuring an Object-Relational Data Type Object Array Mapping"]

Object-relational data type nested table mapping )

[Configuring%20an%20Object-Relational%20Data%20Type%20Nested%20Table%20Mapping%20(ELUG)#Chapter 51, "Configuring an Object-Relational Data Type Nested Table Mapping"]


For more information, see the following:

  • [Introduction%20to%20Mappings%20(ELUG)#Chapter 16, "Introduction to Mappings"]
  • [Introduction%20to%20Relational%20Mappings%20(ELUG)#Chapter 32, "Introduction to Relational Mappings"]


Configuring Common Object-Relational Data Type Mapping Options

[[#Table 50-2] lists the configurable options shared by two or more object-relational data type mapping types. In addition to the configurable options described here, you must also configure the options described for the specific object-relational data type mapping types (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Mapping Types]), as shown in [[#Table 50-1].


Table 50-2 Common Options for Object-Relational Data Type Mappings

Option to Configure JDeveloper
Workbench
Java

Reference class (see [[#Configuring Reference Class])

Unsupported

Unsupported

Supported

Attribute name (see [[#Configuring Attribute Name])

Unsupported

Unsupported

Supported

Field name (see [[#Configuring Field Name])

Unsupported

Unsupported

Supported

Structure name (see [[#Configuring Structure Name])

Unsupported

Unsupported

Supported

Read-only (see [Configuring%20a%20Mapping%20(ELUG)#Configuring Read-Only Mappings])

Unsupported

Unsupported

Supported

Method or direct field access (see [Configuring%20a%20Mapping%20(ELUG)#Configuring Method or Direct Field Accessing at the Mapping Level])

Unsupported

Unsupported

Supported

Indirection (lazy loading) (see [Configuring%20a%20Mapping%20(ELUG)#Configuring Indirection (Lazy Loading)])

Unsupported

Unsupported

Supported

Container policy (see [Configuring%20a%20Mapping%20(ELUG)#Configuring Container Policy])

Unsupported

Unsupported

Supported


Configuring Reference Class

When mapping an attribute that involves a relationship to another class, you must specify the reference class–the Java class to which the mapped attribute refers.

[[#Table 50-3] summarizes which object-relational data type mappings support this option.


Table 50-3 Mapping Support for Reference Class

Mapping How to Use Workbench [[#How to Configure Reference Class Using Java]

Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])

Unsupported.

Supported.

Object-relational data type reference mapping

Unsupported.

Supported.

Object-relational data type array mapping

Unsupported.

Unsupported.

Object-relational data type object array mapping

Unsupported.

Supported.

Object-relational data type nested table mapping )

Unsupported.

Supported.


How to Configure Reference Class Using Java

Use org.eclipse.persistence.mappings.ForeignReferenceMapping method setReferenceClass to specify the target class of the attribute being mapped.

[[#Example 50-1] shows how to use this method with a ReferenceMapping that maps the manager attribute of the Employee class.


Example 50-1 Configuring Reference Class in Java


public void customize(ClassDescriptor descriptor) { 
    ReferenceMapping managerMapping = new ReferenceMapping();
    managerMapping.setReferenceClass("Employee.class"); // set reference class
    managerMapping.setAttributeName("manager");

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


For more information, see the EclipseLink API Reference.


Configuring Attribute Name

All object-relational data type mappings map an attribute in a Java object to field in the database. The attribute name is the name of the attribute being mapped. The name is as specified in the reference class (see [[#Configuring Reference Class]).

[[#Table 50-4] summarizes which object-relational data type mappings support this option.


Table 50-4 Mapping Support for Attribute Name

Mapping How to Use Workbench [[#How to Configure Attribute Name Using Java]

Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])

Supported

Supported.

Object-relational data type reference mapping

Supported

Supported.

Object-relational data type array mapping

Supported

Supported.

Object-relational data type object array mapping

Supported

Supported.

Object-relational data type nested table mapping )

Supported

Supported.


How to Configure Attribute Name Using Java

Use org.eclipse.persistence.mappings.DatabaseMapping method setAttributeName to specify the name of the attribute being mapped.

[[#Example 50-2] shows how to use this method with a ReferenceMapping that maps the manager attribute of the Employee class.


Example 50-2 Configuring Attribute Name in Java


public void customize(ClassDescriptor descriptor) { 
    ReferenceMapping managerMapping = new new ReferenceMapping();
    managerMapping.setReferenceClass("Employee.class"); 
    managerMapping.setAttributeName("manager"); // set attribute name

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


For more information, see the EclipseLink API Reference.


Configuring Field Name

All object-relational data type mappings require the name of database field to which their specified attribute is mapped. This field name can be the column name of a database table or the name of a field in an object type created on the database.

[[#Table 50-5] summarizes which object-relational data type mappings support this option.


Table 50-5 Mapping Support for Field Name

Mapping How to Use Workbench [[#How to Configure Field Name Using Java]

Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])

Unsupported.

Supported.

Object-relational data type reference mapping

Unsupported.

Supported.

Object-relational data type array mapping

Unsupported.

Supported.

Object-relational data type object array mapping

Unsupported.

Supported.

Object-relational data type nested table mapping )

Unsupported.

Supported.


How to Configure Field Name Using Java

Use the object-relational data type mapping method setFieldName to specify the database field to which the attribute is mapped.

[[#Example 50-3] shows how to use this method with an ObjectArrayMapping that maps the Employee class attribute phone to database field name PHONE_NUMBER.


Example 50-3 Configuring Field Name in Java


public void customize(ClassDescriptor descriptor) { 
    ObjectArrayMapping phonesMapping = new ObjectArrayMapping();
    phonesMapping.setReferenceClass("Employee.class");
    phonesMapping.setAttributeName("phone");
    phonesMapping.setFieldName("PHONE_NUMBER"); // set field name

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


For more information, see the EclipseLink API Reference.


Configuring Structure Name

Certain object-relational data type mappings require the specification of the data type or structure name of the field being mapped. The structure name is the name of the array or table type that defines the field.

[[#Table 50-6] summarizes which object-relational data type mappings support this option.


Table 50-6 Mapping Support for Structure Name

Mapping How to Use JDeveloper How to Use Workbench [[#How to Configure Structure Name Using Java]

Object-relational data type structure mapping (see [Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational Data Type Structure Mapping])

Unsupported.

Unsupported.

Unsupported.

Object-relational data type reference mapping

Unsupported.

Unsupported.

Unsupported.

Object-relational data type array mapping

Unsupported.

Unsupported.

Supported.

Object-relational data type object array mapping

Unsupported.

Unsupported.

Supported.

Object-relational data type nested table mapping )

Unsupported.

Unsupported.

Supported.



How to Configure Structure Name Using Java

Use the object-relational data type mapping method setStructureName to specify the structure of the attribute being mapped.

This example shows how to use this method with an ObjectArrayMapping that maps the Employee class attribute phones to database field name PHONE_NUMBERS of type PHONE_ARRAY_TYPE.


Configuring Structure Name in Java

public void customize(ClassDescriptor descriptor) { 
    ObjectArrayMapping phonesMapping = new ObjectArrayMapping();
    phonesMapping.setReferenceClass("Employee.class");
    phonesMapping.setAttributeName("phones");
    phonesMapping.setFieldName("PHONE_NUMBERS");
    phonesMapping.setStructureName("PHONE_ARRAY_TYPE"); // set structure name

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


For more information, see the EclipseLink API Reference.



Copyright Statement

Back to the top