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
Copyright © 1997, 2004, Oracle. All rights reserved.