Direct mappings include a nullValue attribute. Use this attribute to convert database null values to application-specific values (if the application does not allow null values). This applies when typed as primitives. The null value must be set to the desired value, not the database value.
Null values translate in two directions: from null values read from the database to the specified value, and from the specified value back to null when writing or querying. You can also use TopLink to set global default null values on a per-class basis. For more information, refer to the book OracleAS TopLink Application Developer's Guide.
Click the Use Default Value when Database Field is Null option on the mapping's General tab (see Figure 5-2) and the Type and Value drop-down lists to specify the null value.
Copyright © 1997, 2004, Oracle. All rights reserved.