Inheritance information

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

Property Description Default
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
Discriminator Value Specify the discriminator value used to differentiate an entity in this inheritance hierarchy. The value must conform to the specified Discriminator Type.
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
  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
Primary Key Join Columns Use to override the default primary key join columns. Select Override Default, then click Add to select new Join Column.

This field corresponds with @PrimaryKeyJoinColumn annotation.



 

Related task

Specifying entity inheritance
Adding persistence to a class

 

Related reference

JPA Details view (for entities)