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.
Difference between revisions of "Configuring an Object-Relational Data Type Descriptor (ELUG)"
m (New page: <div style="float:right;border:1px solid #000000;padding:5px">__TOC__ Related Topics</div> This secti...) |
m |
||
Line 4: | Line 4: | ||
For information on how to configure EclipseLink descriptor options common to two or more descriptor types, see [[Configuring%20a%20Descriptor%20(ELUG)|Configuring a Descriptor]]. | For information on how to configure EclipseLink descriptor options common to two or more descriptor types, see [[Configuring%20a%20Descriptor%20(ELUG)|Configuring a Descriptor]]. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
This table lists the configurable options for an object-relational data type descriptor. | This table lists the configurable options for an object-relational data type descriptor. | ||
− | |||
<span id="Table 31-1"></span> | <span id="Table 31-1"></span> | ||
− | |||
{| class="RuleFormalMax" dir="ltr" title="Configurable Options for Object-Relational Data Type Descriptor" summary="This table lists the configurable options common to Object-Relational Descriptors 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 Object-Relational Data Type Descriptor" summary="This table lists the configurable options common to Object-Relational Descriptors 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" | ||
Line 178: | Line 170: | ||
==Configuring Field Ordering== | ==Configuring Field Ordering== | ||
− | |||
If your object-relational data type data source driver uses JDBC indexed arrays, you can specify the order in which EclipseLink persists object attributes to define the field index. | If your object-relational data type data source driver uses JDBC indexed arrays, you can specify the order in which EclipseLink persists object attributes to define the field index. | ||
Line 184: | Line 175: | ||
===How to Configure Field Ordering Using Java=== | ===How to Configure Field Ordering Using Java=== | ||
− | |||
Use <tt>ObjectRelationalDescriptor</tt> method <tt>addFieldOrdering</tt> to specify the field ordering. This example shows how to specify the order of the object-relational data type database fields <tt>OBJECT_ID</tt>, <tt>F_NAME</tt>, and <tt>L_NAME</tt> for the <tt>Employee</tt> descriptor. | Use <tt>ObjectRelationalDescriptor</tt> method <tt>addFieldOrdering</tt> to specify the field ordering. This example shows how to specify the order of the object-relational data type database fields <tt>OBJECT_ID</tt>, <tt>F_NAME</tt>, and <tt>L_NAME</tt> for the <tt>Employee</tt> descriptor. | ||
Line 205: | Line 195: | ||
[[Category: Draft]] | [[Category: Draft]] | ||
[[Category: Task]] | [[Category: Task]] | ||
+ | [[Category: ORM]] |
Revision as of 08:35, 17 December 2007
This section describes the various components that you must configure to be able to use an object-relational data type descriptor.
For information on how to configure EclipseLink descriptor options common to two or more descriptor types, see Configuring a Descriptor.
This table lists the configurable options for an object-relational data type descriptor.
Option to Configure | EclipseLink Workbench | Java |
---|---|---|
For more information, see Introduction to Relational Descriptors.
Configuring Field Ordering
If your object-relational data type data source driver uses JDBC indexed arrays, you can specify the order in which EclipseLink persists object attributes to define the field index.
How to Configure Field Ordering Using Java
Use ObjectRelationalDescriptor method addFieldOrdering to specify the field ordering. This example shows how to specify the order of the object-relational data type database fields OBJECT_ID, F_NAME, and L_NAME for the Employee descriptor.
Field Ordering
descriptor.addFieldOrdering("ID"); descriptor.addFieldOrdering("F_NAME"); descriptor.addFieldOrdering("L_NAME");