Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.5.0) Part Number E13981-01 |
|
|
View PDF |
You can configure OC4J to automatically generate all required relationships at deployment time (see "Using Deployment XML"). To use this feature, you must do the following:
Omit all container-managed relationship configuration (see "Configuring a Container-Managed Relationship Field for an EJB 2.1 Entity Bean With Container-Managed Persistence").
Ensure that no toplink-ejb-jar.xml
is present in the EJB module (see "What is the toplink-ejb-jar.xml File?").
You can use this feature in conjunction with automatic database table creation (see "Configuring Automatic Database Table Creation").
To configure default relationship generation, configure the orion-ejb-jar.xml
file element pm-properties
subelement default-mapping
, as Table 14-4 shows.
Table 14-4 orion-ejb-jar.xml File pm-properties Subentries for default-mapping
Entry | Description |
---|---|
|
Optional element that determines what TopLink will do to prepare the database tables that are being mapped to. The following are valid values:
If no The This setting overrides |
|
An element used if the generated table names are not long enough to be unique. Values are restricted to In default mapping, each entity is mapped to one table. The only exception is in many-to-many mappings, where there is one extra relation table involved in the source and target entities. When However, if the same entity is defined in multiple JAR files in an application, or across multiple applications, table-naming collision is inevitable. To address this problem, set If there is no The |