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 a Relational Direct Map Mapping (ELUG)"

m (New page: <div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__ Related Topics</div> This se...)
 
m (Introduction to Relational Direct Map Mapping Configuration)
Line 28: Line 28:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r2c1-t2" headers="r1c1-t2" align="left" |
 
| id="r2c1-t2" headers="r1c1-t2" align="left" |
Target table (see [[Configuring%20a%20Relational%20Direct%20Collection%20(ELUG)|Configuring Target Table]])
+
Target table (see [[Configuring%20a%20Relational%20Direct%20Collection%20Mapping (ELUG)|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 116: Line 116:
 
For more information, see the following:
 
For more information, see the following:
  
* [[Introduction%20to%20Relational%20Mappings%20(ELUG)|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]]
  
For information on using JPA to configure direct map mappings, see [[Using%20EclipseLink%20JPA%20Extensions%20(ELUG)|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==

Revision as of 20:15, 29 November 2007


This section describes the various components that you must configure in order to use a relational direct map 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.

Configurable Options for Relational Direct Map Mapping lists the configurable options for a relational direct map mapping.


Introduction to Relational Direct Map Mapping Configuration

This table lists the configurable options for a relational direct map mapping.


Configurable Options for Relational Direct Map Mapping

Option Workbench Java

Target table (see Configuring Target Table)

Supported

Supported

Direct value field (see #Configuring Direct Value Field)

Supported

Supported

Direct key field (see #Configuring Direct Key Field)

Supported

Supported

Method or direct field access (see Configuring a Type Conversion Converter)

Supported

Supported

Read-only mapping (see Configuring Read-Only Mappings)

Supported

Supported

Batch reading (see Configuring Batch Reading)

Supported

Supported

Indirection (lazy loading) (see Configuring Mapping Comments)

Supported

Supported

Container policy (see Configuring Mapping Comments)

Supported

Supported

Mapping comments (see Configuring Mapping Comments)

Supported

Supported

Key converters (see #Configuring Key Converters)

Supported

Supported

Value converters (see #Configuring Value Converters)

Supported

Supported

Table and field references (see Configuring Joining at the Mapping Level)

Supported

Supported


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

  1. Select the mapped attribute in the Navigator. Its properties appear in the Editor.
  2. Click the General tab. The General tab appears.
    Figure 43-1 General Tab, Direct Value Field
    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.

See Also

#Configuring Direct Value Field


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.

  1. Select the mapped attribute in the Navigator. Its properties appear in the Editor.
  2. Click the General tab. The General tab appears.
    Figure 43-2 General Tab, Direct Key Field
    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.

See Also

#Configuring Direct Key Field
#Configuring Key Converters

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:

  1. Select the mapped attribute in the Navigator. Its properties appear in the Editor.
  2. Click the Converter tab. The Converter tab appears.
  3. Click the Key Converter tab. The Key Converter tab appears.
    Converter Tab, Key Converter Subtab
    Converter Tab, Key Converter Subtab
  4. Select the appropriate [topicid:keyConverter Key Converter].


Converter Description
No Converter Do not use a Key Converter for this mapping.
Serialized Object Converter

See Configuring a Serialized Object Converter.

Type Conversion Converter

See Configuring a Type Conversion Converter.

Object Type Converter

See Configuring an Object Type Converter.


See Also

#Configuring Key Converters
#Configuring Direct Key Field

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

  1. Select the mapped attribute in the Navigator. Its properties appear in the Editor.
  2. Click the Converter tab. The Converter tab appears.
  3. Click the Value Converter tab. The Value Converter tab appears.
    Converter Tab, Value Converter Subtab
    Converter Tab, Value Converter Subtab
  4. Select the appropriate Value Converter.


Converter Description
No Converter Do not use a Value Converter for this mapping.
Serialized Object Converter

See Configuring a Serialized Object Converter.

Type Conversion Converter

See Configuring a Type Conversion Converter.

Object Type Converter

See Configuring an Object Type Converter.


See Also

#Configuring Value Converters



Copyright Statement

Back to the top