Inheritance

This table lists the fields available on the Inheritance area in the JPA Details view for each entity type.

Property Description Default Available for Entity Type

Strategy

Specify the strategy to use when mapping a class or class hierarchy:

  • Single table – All classes in the hierarchy are mapped to a single table.

  • Joined – The root of the hierarchy is mapped to a single table; each child maps to its own table.

  • Table per class – Each class is mapped to a separate table.

This field corresponds to the @Inheritance annotation.

Single table

Entity


Discriminator Value

Specify the discriminator value used to differentiate an entity in this inheritance hierarchy. The value must conform to the specified Discriminator Type.


Entity


Discriminator Column

These fields are available when using a Single or Joined inheritance strategy.

This field corresponds to the @DiscriminatorColumn annotation.

Use the Details area to define the Length and Column definition of this Discriminator Column.



Name

Name of the discriminator column


Entity


Type

Set this field to set the discriminator type to Char or Integer (instead of its default: String). The Discriminator Value must conform to this type.

String

Entity


Length

The column length for String-based discriminator types.

0

Entity


Column definition

The SQL fragment that is used when generating the DDL for the discriminator column.


Entity


Primary Key Join Columns

Use to override the default primary key join columns. Select Override Default, then click Add to select new Join Column with the Add Primary Key Join Column dialog.

This field corresponds with @PrimaryKeyJoinColumn annotation.


Entity



Refer to "Specifying entity inheritance" for additional information.

Related tasks

Related reference