Skip Headers

Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Configuring Structure Name

Certain object-relational 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 mappings support this option.

Table 50-6 Mapping Support for Structure Name

Mapping | Using TopLink Workbench | Using Java
--- | --- | ---
Object-Relational Structure Mapping |  |
Object-Relational Reference Mapping |  |
Object-Relational Array Mapping |  |
Object-Relational Object Array Mapping |  |
Object-Relational Nested Table Mapping |  |

## Using Java

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

Example 50-4 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`.

Example 50-4 Configuring Structure Name in Java

    ObjectArrayMapping phonesMapping = new ObjectArrayMapping();
    managerMapping.setReferenceClass("Employee.class");
    phonesMapping.setAttributeName("phones");
    phonesMapping.setFieldName("PHONE_NUMBERS");
    phonesMapping.setStructureName("PHONE_ARRAY_TYPE");