Working with Object Type Mappings

Object type mappings match a fixed number of database values to Java objects. Use these mappings when the values in the database differ from those in Java. Object types mappings are similar to direct-to-field mappings in all other respects.

The following figure illustrates an object type mapping between the Employee attribute gender and the relational database column GENDER. If the gender value in the Java class = Male, the system stores it in the GENDER database field as M; Female is stored as F.

Figure 5-12 Object Type Mappings

This figure shows an object type mapping between a Java class and a relational database.


Related Topics

About TopLink Mapping Types
Working with Direct Mappings

 

Creating Object Type Mappings for Java Objects
Creating Object Type Mappings for CMP EJBs

 

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