Skip Headers

# Using Java

Previous

Next

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

Example: Configuring Structure Name in Java 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`.

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