12.  Mapping Limitations

12.1. Table Per Class

The following sections outline the limitations OpenJPA places on specific mapping strategies.

12.1.  Table Per Class

Table-per-class inheritance mapping has the following limitations:

  • You cannot traverse polymorphic relations to non-leaf classes in a table-per-class inheritance hierarchy in queries.

  • You cannot map a one-sided polymorphic relation to a non-leaf class in a table-per-class inheritance hierarchy using an inverse foreign key.

  • You cannot use an order column in a polymorphic relation to a non-leaf class in a table-per-class inheritance hierarchy mapped with an inverse foreign key.

  • Table-per-class hierarchies impose limitations on eager fetching. See Section 8.2, “ Eager Fetching Considerations and Limitations ”.

Note

Non-polymorphic relations do not suffer from these limitations. You can declare a non-polymorphic relation using the extensions described in Section 13.2.2, “ Nonpolymorphic ”.