Creating Object Type Mappings

Use this procedure to create an object type mapping between an attribute and a database column.

To create a basic object type mapping:

  1. In the Application Navigator, select the attribute to be mapped.
  2. Click the Object-Type Mapping button Object-type Mapping button. on the mapping toolbar. The Object type mapping tab appears in the Editor pane.

    Figure 7-3 Object Type Mapping General Properties

    This figure shows the General tab of an object type mapping.

  3. Choose the appropriate database field in the Database Field drop-down list.
  4. Select Use Default Value When Database Field is Null to specify a default Type and Value to use if the database field is null.
  5. Set the database type from the Database Type drop-down list and the Java type from the Object type drop-down list.
  6. Click on Add to add Database Value and Object Value pairs to the table. Select the Default Attribute Value option for the value to use as the default.
    To remove a database value, select the value and click Remove.

You can also specify:

 

Copyright © 1997, 2004, Oracle. All rights reserved.