Red Hat Training

A Red Hat training course is available for Red Hat JBoss Web Server

9.2. Limitations

9.2.1. Inheritance Mapping Limitations

There are limitations to the "implicit polymorphism" approach to the table per concrete-class mapping strategy. There are somewhat less restrictive limitations to <union-subclass> mappings.
The following list shows the limitations of table per concrete-class mappings, and of implicit polymorphism, in Hibernate.
table per class-heirarchy, table per subclass
  • Polymorphic many-to-one: <many-to-one>
  • Polymorphic one-to-one: <one-to-one>
  • Polymorphic one-to-many: <one-to-many>
  • Polymorphic many-to-many: <many-to-many>
  • Polymorphic load() or get(): s.get(Payment.class, id)
  • Polymorphic queries: from Payment p
  • Polymorphic joins: from Order o join o.payment p
Outer join fetching is supported.
table per concrete-class (union-subclass)
  • Polymorphic many-to-one: <many-to-one>
  • Polymorphic one-to-one: <one-to-one>
  • Polymorphic one-to-many: <one-to-many> (for inverse="true" only)
  • Polymorphic many-to-many: <many-to-many>
  • Polymorphic load() or get(): s.get(Payment.class, id)
  • Polymorphic queries: from Payment p
  • Polymorphic joins: from Order o join o.payment p
Outer join fetching is supported.
table per concrete class (implicit polymorphism
  • Polymorphic many-to-one: <any>
  • Polymorphic many-to-many: <many-to-many>
  • Polymorphic load() or get(): s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()
  • Polymorphic queries: from Payment p
Polymorphic one-to-one, polymorphic one-to-many, polymorphic joins, and outer join fetching are not supported.