Creating Many-to-Many Mappings
With the TopLink Mapping editor, you can create both unidirectional or bidirectional many-to-many (M:M) mappings between CMP EJBs. These mappings can be independent.
Note: In a bi-directional M:M relationship, one mapping must be set to read-only, to prevent both mappings from writing to the relation table at the same time.
Use this procedure to create a many-to-many mapping.
To create a many-to-many mapping:
- In the Structure window, select the attribute to be mapped.
- Enter the required information to define this mapping.
- Click the Many-to-Many Mapping - Collection Options tab.
- Enter the collection information.
- Click the Many-to-Many Mapping - Source Reference tab.
- Select the source table reference.
- Click the Many-to-Many Mapping - Target Reference tab.
- Select the target table reference.
Related Topics
About CMP EJB Mappings
Working with CMR Relationship Mappings
Working with Many-to-Many Mappings
Specifying Advanced Features by Amending the Descriptor
Copyright © 1997, 2004, Oracle.
All rights reserved.