Inheritance relationships

Support of inheritance relationships

The SQL Designer module supports inheritance relationships between persistent classes. The sections which follow deal with four inheritance mapping strategies supported by Hibernate:

The type of mapping applied to a given inheritance link can be configured in the SQL tab on the inheritance link in question.

One table per class hierarchy

Using this strategy, the set of persistent classes in the inheritance hierarchy is mapped to a single table of the SQL model.

Constraints at persistence model level:

One table per child class

Using this strategy, each of the persistent classes in the inheritance hierarchy is mapped to a table of the SQL model.

Constraints at persistence model level:

The SQL Designer module supports a variant of this strategy (one table per child class using a discriminator), which leads to the following constraints:

One table per concrete class

Using this strategy, each of the non-abstract persistent classes of the inheritance hierarchy is mapped to a table of the SQL model.

Constraints at persistence model level:

One table per concrete class using implicit polymorphism

This is a variation on the previous strategy. Each of the non-abstract persistent classes of the inheritance hierarchy is mapped to a table of the SQL model.

Constraints at persistence model level: