Table Per Class Inheritance Mapping Strategy

Each class is mapped to its own primary table. All persistent attributes of the class, including inherited persistent attributes, are mapped to columns of the table.

Classes Tables


orm43.gif
  1. Define entity class mappings for each class in the hierarchy, mapping each class to its own primary table:


  2. Define attribute mappings and association mappings for each class.
  3. Define identifier mapping in the root class.
  4. Define persistence generation type for each class.
  5. Define persistence generation type of leaf classes as Generate table and all the other classes as Migrate columns.
    Note: Super classes can be also mapped to primary tables of subclasses if inherited persistent attributes are mapped in different ways for subclasses, for example to different columns. The other primary table can just be secondary tables. PowerDesigner will generate these secondary tables for super classes.

    For this kind of strategy, some super classes can have no table mapped. These classes are used to define state and mapping information that can be inherited by their subclasses.