Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.1.0) Part Number B28221-02 |
|
|
View PDF |
Use a basic mapping to map an field that contains a primitive or JDK object value. For example, use a basic mapping to store a String
attribute in a VARCHAR
column.
You define a basic mapping at one of the property (getter or setter method) or field level of your entity.
Optionally, you can define the strategy for fetching data from the database (see "Configuring Lazy Loading".
For more information, see "Understanding Direct-to-Field Mapping" in the Oracle TopLink Developer's Guide.
Note:
For an EJB 3.0 basic mapping code example, see:http://www.oracle.com/technology/tech/java/oc4j/ejb3/howtos-ejb3/howtoejb30mappingannotations/doc/how-to-ejb30-mapping-annotations.html#basic
.Example 7-17 shows how to use the @Basic
annotation to specify a basic mapping for field firstName
.