Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
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.

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");