
Chapter 4 Generating Hibernate Persistent Objects and JSF Pages
Defining Hibernate Inheritance Mappings
Hibernate supports the three basic inheritance mapping strategies:
- Table per class hierarchy
- Table per subclass
- Table per concrete class
To define an inheritance mapping strategy:
- Open the class property sheet, and click the Detail tab.
- Select one of the following options:
- Generate table - the class will have its own table.
- Migrate columns - the corresponding attributes of the class should be immigrated to its corresponding parent class's table or child class's table, depending on whether the parent or child class is generated.
You can also set the Persistence mode in the generalization property sheet to control whether each class should generate a table or migrate columns in the inheritance hierarchy.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|