Creating inheritance maps
Use the Mapping editor to create inheritance mappings.
- Select the enterprise bean and the corresponding table. Similar to creating secondary tables, you need to have a primary-key to primary-key foreign-key.
- Right-click the table element and select Create Mapping. The rest of the beans in the inheritance structure are then mapped as a root/leaf inheritance map. You can regenerate the default map and schema using the Mapping wizard.
Restriction:
- Do not use BLOB types in a root-leaf inheritance structure if you are using Oracle as your database. Root-leaf inheritance mapping cannot be supported for the MySQL, InstantDB, SQL92, and SQL99 databases. They do not support the SQL set operators required for the complex queries used for a root-leaf mapping. To test against these databases, you will need to use single-table mapping.
- Mapping CMP fields to Not-Null columns is not supported in inherited beans.
- Optimistic predicates can only be set on CMP fields from the root bean.
Parent topic
Updating maps with the Mapping editor