Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
If you are defining the descriptor for a class that inherits attributes from another class, then you can create mappings for those attributes. If you remap an attribute that was already mapped in the superclass, then the new mapping applies to the subclass only. Any other siblings that inherit the attribute are unaffected.
If you leave inherited attributes unmapped, TopLink uses the mapping (if any) from the superclass if the superclass's descriptor has been designated as the parent descriptor.
Table 28-23 summarizes which descriptors support inherited attribute mapping configuration.
Table 28-23 Descriptor Support for Inherited Attribute Mapping Configuration
Descriptor | Using TopLink Workbench
|
Using Java
|
---|---|---|
Relational Descriptors |
|
|
Object-Relational Descriptors |
![]() |
|
EIS Descriptors |
|
|
XML Descriptors |
|
|
For more information, see "Descriptors and Inheritance".
To map inherited attributes, use this procedure:
In the Navigator, right-click a descriptor and choose Map Inherited Attributes > selected class from the context menu or choose Selected > Map Inherited Attributes from the menu.
The mappings list now includes all the attributes from the superclass of this class.
Map any desired attributes. See Chapter 34, "Creating a Mapping" for more information.
Using Java, attributes inherited by a subclass from a superclass will be visible and you can always create a mapping to these inherited attributes.