Oracle® Application Server TopLink Mapping Workbench User's Guide
10g Release 2 (10.1.2) Part No. B15900-01 |
|
Previous |
Next |
Relational mappings define how persistent objects reference other persistent objects. Oracle Application Server TopLink furnishes the following relationship mappings:
Direct collection mappings — Map Java collections of objects that do not have descriptors (see "Working with Direct Collection Mappings").
Aggregate object mappings — Strict one-to-one mappings that require both objects to exist in the same database row (see "Query Optimization Using Joining").
One-to-one mappings — Map a reference to another persistent Java object to the database (see "Working with One-to-One Mappings").
Variable one-to-one mappings — Map a reference to an interface to the database (see "Working with Variable One-to-One Mappings").
One-to-many mappings — Map Java collections of persistent objects to the database (see "Working with One-to-Many Mappings").
Aggregate collection mappings — Map Java collections of persistent objects to the database (see "Working with Aggregate Collection Mappings").
Many-to-many mappings — Use an association table to map Java collections of persistent objects to the database (see "Working with Many-to-Many Mappings").
Oracle Application Server TopLink also provides object-relational relationship mappings (see Chapter 5, "Understanding Direct Mappings", and Chapter 7, "Understanding Object-Relational Mappings").
All OracleAS TopLink relationship mappings are unidirectional, from the class being described (the source class) to the class with which it is associated (the target class). The target class does not have a reference to the source class in a unidirectional relationship.
To implement a bidirectional relationship (classes that reference each other), use two unidirectional mappings with the sources and targets reversed.