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 Direct Map Mapping (ELUG)"
m (→Introduction to Relational Direct Map Mapping Configuration) |
m (→How to Configure Value Converters Using Workbench) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__ | <div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__ | ||
[[Special:Whatlinkshere/Configuring a Relational Direct Map Mapping (ELUG)|Related Topics]]</div> | [[Special:Whatlinkshere/Configuring a Relational Direct Map 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 direct map mapping. | This table lists the configurable options for a relational direct map mapping. | ||
Line 19: | Line 8: | ||
<span id="Table 43-1"></span> | <span id="Table 43-1"></span> | ||
− | + | {| class="RuleFormalMax" dir="ltr" title="Configurable Options for Relational Direct Map Mapping" summary="This table lists the configurable options for relational direct map mappings 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" | |
− | + | ||
− | {| class="RuleFormalMax" dir="ltr" title="Configurable Options for Relational Direct Map Mapping" summary="This table lists the configurable options for relational direct map mappings and categorizes them as Basic and Advanced and indicates if the option can be configured with the | + | |
|- 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 28: | Line 15: | ||
|- 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%20Direct%20Collection%20Mapping (ELUG)#Configuring Target Table|Configuring Target Table]] | |
| headers="r2c1-t2 r1c2-t2" align="left" | | | headers="r2c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 35: | Line 22: | ||
|- 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 Direct Value Field|Direct value field ]] | |
| headers="r3c1-t2 r1c2-t2" align="left" | | | headers="r3c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 42: | Line 29: | ||
|- 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 Direct Key Field|Direct key field ]] | |
| headers="r4c1-t2 r1c2-t2" align="left" | | | headers="r4c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 49: | Line 36: | ||
|- 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 a Type Conversion Converter|Method or direct field access ]] | |
| headers="r5c1-t2 r1c2-t2" align="left" | | | headers="r5c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 56: | Line 43: | ||
|- 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%20Mapping%20(ELUG)#Configuring Read-Only Mappings|Read-only mapping ]] | |
| headers="r6c1-t2 r1c2-t2" align="left" | | | headers="r6c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 63: | Line 50: | ||
|- 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%20Relational%20Mapping%20(ELUG)#Configuring Batch Reading|Batch reading ]] | |
| headers="r7c1-t2 r1c2-t2" align="left" | | | headers="r7c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 70: | Line 57: | ||
|- 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)|Indirection (lazy loading)]] | |
| headers="r8c1-t2 r1c2-t2" align="left" | | | headers="r8c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 77: | Line 64: | ||
|- 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|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 84: | Line 71: | ||
|- 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|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 91: | Line 78: | ||
|- 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 Key Converters|Key converters ]] | |
| headers="r11c1-t2 r1c2-t2" align="left" | | | headers="r11c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 98: | Line 85: | ||
|- 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 Value Converters|Value converters ]] | |
| 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 92: | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r13c1-t2" headers="r1c1-t2" align="left" | | | id="r13c1-t2" headers="r1c1-t2" align="left" | | ||
− | + | [[Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring Joining at the Mapping Level|Table and field references ]] | |
| headers="r13c1-t2 r1c2-t2" align="left" | | | headers="r13c1-t2 r1c2-t2" align="left" | | ||
[[Image:support.gif|Supported]] | [[Image:support.gif|Supported]] | ||
Line 113: | Line 100: | ||
+ | This example shows how to create a direct map mapping and add it to a descriptor using Java code. | ||
− | + | <span id="Example 36-1"></span> | |
+ | ''''' Direct Map Mapping''''' | ||
+ | public void customize(ClassDescriptor descriptor) { | ||
+ | DirectMapMapping mapping = new DirectMapMapping(); | ||
+ | |||
+ | // configure mapping | ||
+ | ... | ||
+ | |||
+ | // add mapping to descriptor | ||
+ | descriptor.addMapping(mapping); | ||
+ | } | ||
+ | For more information, see the following: | ||
* [[Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct Map Mapping|Direct Map Mapping]] | * [[Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct Map Mapping|Direct Map 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 direct map mappings, see [[Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#How to Use the @BasicMap Annotation|How to Use the @BasicMap Annotation]]. | For information on using JPA to configure direct map mappings, see [[Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#How to Use the @BasicMap Annotation|How to Use the @BasicMap Annotation]]. | ||
+ | |||
+ | |||
==Configuring Direct Value Field== | ==Configuring Direct Value Field== | ||
− | The direct value field in the reference table stores the primitive data value of the map value. If the value's object value and database value are different types, use a converter (see [[#Configuring Value Converters]]). | + | The direct value field in the reference table stores the primitive data value of the map value. If the value's object value and database value are different types, use a converter (see [[#Configuring Value Converters|Configuring Value Converters]]). |
− | + | ||
Line 130: | Line 131: | ||
# Select the mapped attribute in the '''Navigator'''. Its properties appear in the Editor. | # Select the mapped attribute in the '''Navigator'''. Its properties appear in the Editor. | ||
− | # Click the '''General''' tab. The General tab appears.<br>''''' | + | # Click the '''General''' tab. The General tab appears.<br>''''' General Tab, Direct Value Field'''''<br>[[Image:dmdirval.gif|General Tab, Direct Value Field]] |
+ | #Use the '''Direct Value Field''' list to select the field from the '''Target Table''' table that contains the object of the direct map mapping. | ||
− | |||
− | + | ===How to Configure Direct Value Fields Using Java=== | |
− | + | ||
+ | Use the <tt>DirectMapMapping</tt> method <tt>setDirectFieldName</tt> to set the direct fields for your mapping. | ||
+ | For more information about the available methods for <tt>DirectMapMapping</tt>, see the ''EclipseLink API Reference''. | ||
− | |||
− | |||
− | |||
− | |||
==Configuring Direct Key Field== | ==Configuring Direct Key Field== | ||
− | The direct key field in the reference table stores the primitive data value of the map key. If the key's object value and database value are different types, use a converter (see [[#Configuring Key Converters]]). | + | The direct key field in the reference table stores the primitive data value of the map key. If the key's object value and database value are different types, use a converter (see [[#Configuring Key Converters|Configuring Key Converters]]). |
− | + | ||
Line 154: | Line 151: | ||
To specify the direct key field in the reference table, use this procedure. | To specify the direct key field in the reference table, use this procedure. | ||
− | |||
# Select the mapped attribute in the '''Navigator'''. Its properties appear in the Editor. | # Select the mapped attribute in the '''Navigator'''. Its properties appear in the Editor. | ||
− | # Click the '''General''' tab. The General tab appears.<br>''''' | + | # Click the '''General''' tab. The General tab appears.<br>''''' General Tab, Direct Key Field'''''<br>[[Image:dmdirkey.gif|General Tab, Direct Key Field]] |
− | + | #Use the '''Direct Key Field''' list to select the key from the '''Target Table''' table that contains the object of the direct map mapping. | |
− | Use the '''Direct Key Field''' list to select the key from the '''Target Table''' table that contains the object of the direct map mapping. | + | |
− | |||
− | |||
− | |||
===How to Configure Direct Key Field Using Java=== | ===How to Configure Direct Key Field Using Java=== | ||
Line 175: | Line 167: | ||
If the key's object value and database value are different types, use a converter. EclipseLink supports the following key converters: | If the key's object value and database value are different types, use a converter. EclipseLink supports the following key converters: | ||
− | + | * [[Introduction%20to%20Mappings%20(ELUG)#Serialized Object Converter|Serialized Object Converter]] | |
− | * [[Introduction%20to%20Mappings%20(ELUG)|Serialized Object Converter]] | + | * [[Introduction%20to%20Mappings%20(ELUG)#Type Conversion Converter|Type Conversion Converter]] |
− | * [[Introduction%20to%20Mappings%20(ELUG)|Type Conversion Converter]] | + | * [[Introduction%20to%20Mappings%20(ELUG)#Object Type Converter|Object Type Converter]] |
− | * [[Introduction%20to%20Mappings%20(ELUG)|Object Type Converter]] | + | |
− | + | ||
Line 185: | Line 175: | ||
Use this procedure to specify the converter for a direct map mapping key: | Use this procedure to specify the converter for a direct map mapping key: | ||
− | |||
# Select the mapped attribute in the '''Navigator'''. Its properties appear in the Editor. | # Select the mapped attribute in the '''Navigator'''. Its properties appear in the Editor. | ||
# Click the '''Converter''' tab. The Converter tab appears. | # Click the '''Converter''' tab. The Converter tab appears. | ||
# Click the '''Key Converter''' tab. The Key Converter tab appears.<br>'''''Converter Tab, Key Converter Subtab'''''<br>[[Image:keyconv.gif|Converter Tab, Key Converter Subtab]] | # Click the '''Key Converter''' tab. The Key Converter tab appears.<br>'''''Converter Tab, Key Converter Subtab'''''<br>[[Image:keyconv.gif|Converter Tab, Key Converter Subtab]] | ||
− | # Select the appropriate | + | # Select the appropriate Key Converter. |
− | + | ||
− | + | ||
{| class="HRuleInformal" dir="ltr" title="This table identifies the available converters." summary="This table identifies the available converters." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows" | {| class="HRuleInformal" dir="ltr" title="This table identifies the available converters." summary="This table identifies the available converters." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows" | ||
Line 203: | Line 190: | ||
| id="r3c1-t3" headers="r1c1-t3" align="left" | '''Serialized Object''' '''Converter''' | | id="r3c1-t3" headers="r1c1-t3" align="left" | '''Serialized Object''' '''Converter''' | ||
| headers="r3c1-t3 r1c2-t3" align="left" | | | headers="r3c1-t3 r1c2-t3" align="left" | | ||
− | See [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Serialized Object Converter]]. | + | See [[Configuring%20a%20Mapping%20(ELUG)#Configuring a Serialized Object Converter|Configuring a Serialized Object Converter]]. |
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r4c1-t3" headers="r1c1-t3" align="left" | '''Type Conversion Converter''' | | id="r4c1-t3" headers="r1c1-t3" align="left" | '''Type Conversion Converter''' | ||
| headers="r4c1-t3 r1c2-t3" align="left" | | | headers="r4c1-t3 r1c2-t3" align="left" | | ||
− | See [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Type Conversion Converter]]. | + | See [[Configuring%20a%20Mapping%20(ELUG)#Configuring a Type Conversion Converter|Configuring a Type Conversion Converter]]. |
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r5c1-t3" headers="r1c1-t3" align="left" | '''Object Type''' '''Converter''' | | id="r5c1-t3" headers="r1c1-t3" align="left" | '''Object Type''' '''Converter''' | ||
| headers="r5c1-t3 r1c2-t3" align="left" | | | headers="r5c1-t3 r1c2-t3" align="left" | | ||
− | See [[Configuring%20a%20Mapping%20(ELUG)|Configuring an Object Type Converter]]. | + | See [[Configuring%20a%20Mapping%20(ELUG)#Configuring an Object Type Converter|Configuring an Object Type Converter]]. |
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
===How to Configure Key Converters Using Java=== | ===How to Configure Key Converters Using Java=== | ||
Line 225: | Line 207: | ||
For more information about the available methods for <tt>DirectMapMapping</tt>, see the ''EclipseLink API Reference''. | For more information about the available methods for <tt>DirectMapMapping</tt>, see the ''EclipseLink API Reference''. | ||
+ | |||
+ | |||
==Configuring Value Converters== | ==Configuring Value Converters== | ||
If the value's object value and database value are different types, use a converter. EclipseLink supports the following value converters: | If the value's object value and database value are different types, use a converter. EclipseLink supports the following value converters: | ||
− | + | * [[Introduction%20to%20Mappings%20(ELUG)#Serialized Object Converter|Serialized Object Converter]] | |
− | * [[Introduction%20to%20Mappings%20(ELUG)|Serialized Object Converter]] | + | * [[Introduction%20to%20Mappings%20(ELUG)#Type Conversion Converter|Type Conversion Converter]] |
− | * [[Introduction%20to%20Mappings%20(ELUG)|Type Conversion Converter]] | + | * [[Introduction%20to%20Mappings%20(ELUG)#Object Type Converter|Object Type Converter]] |
− | * [[Introduction%20to%20Mappings%20(ELUG)|Object Type Converter]] | + | |
− | + | ||
Line 242: | Line 224: | ||
# Click the '''Value Converter''' tab. The Value Converter tab appears.<br>'''''Converter Tab, Value Converter Subtab'''''<br>[[Image:valconv.gif|Converter Tab, Value Converter Subtab]] | # Click the '''Value Converter''' tab. The Value Converter tab appears.<br>'''''Converter Tab, Value Converter Subtab'''''<br>[[Image:valconv.gif|Converter Tab, Value Converter Subtab]] | ||
# Select the appropriate Value Converter. | # Select the appropriate Value Converter. | ||
− | |||
− | |||
{| class="HRuleInformal" dir="ltr" title="This table identifies the available converters." summary="This table identifies the available converters." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows" | {| class="HRuleInformal" dir="ltr" title="This table identifies the available converters." summary="This table identifies the available converters." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows" | ||
Line 255: | Line 235: | ||
| id="r3c1-t4" headers="r1c1-t4" align="left" | '''Serialized Object''' '''Converter''' | | id="r3c1-t4" headers="r1c1-t4" align="left" | '''Serialized Object''' '''Converter''' | ||
| headers="r3c1-t4 r1c2-t4" align="left" | | | headers="r3c1-t4 r1c2-t4" align="left" | | ||
− | See [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Serialized Object Converter]] | + | See [[Configuring%20a%20Mapping%20(ELUG)#Configuring a Serialized Object Converter|Configuring a Serialized Object Converter]] |
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r4c1-t4" headers="r1c1-t4" align="left" | '''Type Conversion Converter''' | | id="r4c1-t4" headers="r1c1-t4" align="left" | '''Type Conversion Converter''' | ||
| headers="r4c1-t4 r1c2-t4" align="left" | | | headers="r4c1-t4 r1c2-t4" align="left" | | ||
− | See [[Configuring%20a%20Mapping%20(ELUG)|Configuring a Type Conversion Converter]] | + | See [[Configuring%20a%20Mapping%20(ELUG)#Configuring a Type Conversion Converter|Configuring a Type Conversion Converter]] |
|- align="left" valign="top" | |- align="left" valign="top" | ||
| id="r5c1-t4" headers="r1c1-t4" align="left" | '''Object Type Converter''' | | id="r5c1-t4" headers="r1c1-t4" align="left" | '''Object Type Converter''' | ||
| headers="r5c1-t4 r1c2-t4" align="left" | | | headers="r5c1-t4 r1c2-t4" align="left" | | ||
− | See [[Configuring%20a%20Mapping%20(ELUG)|Configuring an Object Type Converter]] | + | See [[Configuring%20a%20Mapping%20(ELUG)#Configuring an Object Type Converter|Configuring an Object Type Converter]] |
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 279: | Line 254: | ||
[[Category: EclipseLink User's Guide]] | [[Category: EclipseLink User's Guide]] | ||
[[Category: Task]] | [[Category: Task]] | ||
− | [[Category: | + | [[Category: Release 1]] |
+ | [[Category: ORM]] |
Latest revision as of 07:37, 20 August 2008
Contents
For information on how to create EclipseLink mappings, see Creating a Mapping.
This table lists the configurable options for a relational direct map mapping.
Option | Workbench | Java |
---|---|---|
This example shows how to create a direct map mapping and add it to a descriptor using Java code.
Direct Map Mapping
public void customize(ClassDescriptor descriptor) { DirectMapMapping mapping = new DirectMapMapping(); // configure mapping ... // add mapping to descriptor descriptor.addMapping(mapping); }
For more information, see the following:
For information on using JPA to configure direct map mappings, see How to Use the @BasicMap Annotation.
Configuring Direct Value Field
The direct value field in the reference table stores the primitive data value of the map value. If the value's object value and database value are different types, use a converter (see Configuring Value Converters).
How to Configure Direct Value Fields Using Workbench
- Select the mapped attribute in the Navigator. Its properties appear in the Editor.
- Click the General tab. The General tab appears.
General Tab, Direct Value Field - Use the Direct Value Field list to select the field from the Target Table table that contains the object of the direct map mapping.
How to Configure Direct Value Fields Using Java
Use the DirectMapMapping method setDirectFieldName to set the direct fields for your mapping.
For more information about the available methods for DirectMapMapping, see the EclipseLink API Reference.
Configuring Direct Key Field
The direct key field in the reference table stores the primitive data value of the map key. If the key's object value and database value are different types, use a converter (see Configuring Key Converters).
How to Configure Direct Key Field Using Workbench
To specify the direct key field in the reference table, use this procedure.
- Select the mapped attribute in the Navigator. Its properties appear in the Editor.
- Click the General tab. The General tab appears.
General Tab, Direct Key Field - Use the Direct Key Field list to select the key from the Target Table table that contains the object of the direct map mapping.
How to Configure Direct Key Field Using Java
Use the DirectMapMapping method setDirectKeyFieldName to set the direct key field for your mapping.
For more information about the available methods for DirectMapMapping, see the EclipseLink API Reference.
Configuring Key Converters
If the key's object value and database value are different types, use a converter. EclipseLink supports the following key converters:
How to Configure Key Converters Using Workbench
Use this procedure to specify the converter for a direct map mapping key:
- Select the mapped attribute in the Navigator. Its properties appear in the Editor.
- Click the Converter tab. The Converter tab appears.
- Click the Key Converter tab. The Key Converter tab appears.
Converter Tab, Key Converter Subtab - Select the appropriate Key Converter.
Converter | Description |
---|---|
No Converter | Do not use a Key Converter for this mapping. |
Serialized Object Converter | |
Type Conversion Converter | |
Object Type Converter |
How to Configure Key Converters Using Java
You can configure whether or not to allow null values using the DirectMapMapping method setKeyConverter.
For more information about the available methods for DirectMapMapping, see the EclipseLink API Reference.
Configuring Value Converters
If the value's object value and database value are different types, use a converter. EclipseLink supports the following value converters:
How to Configure Value Converters Using Workbench
- Select the mapped attribute in the Navigator. Its properties appear in the Editor.
- Click the Converter tab. The Converter tab appears.
- Click the Value Converter tab. The Value Converter tab appears.
Converter Tab, Value Converter Subtab - Select the appropriate Value Converter.
Converter | Description |
---|---|
No Converter | Do not use a Value Converter for this mapping. |
Serialized Object Converter | |
Type Conversion Converter | |
Object Type Converter |