Inheritance strategy |
Polymorphic many-to-one |
Polymorphic one-to-one |
Polymorphic one-to-many |
Polymorphic many-to-many |
Polymorphic load()/get() |
Polymorphic queries |
Polymorphic joins |
Outer join fetching |
table per class-hierarchy |
<many-to-one> |
<one-to-one> |
<one-to-many> |
<many-to-many> |
s.get(Payment.class, id) |
from Payment p |
from Order o join o.payment p |
Supported |
table per subclass |
<many-to-one> |
<one-to-one> |
<one-to-many> |
<many-to-many> |
s.get(Payment.class, id) |
from Payment p |
from Order o join o.payment p |
Supported |
table per concrete-class (union-subclass) |
<many-to-one> |
<one-to-one> |
<one-to-many> (for inverse="true" only) |
<many-to-many> |
s.get(Payment.class, id) |
from Payment p |
from Order o join o.payment p |
Supported |
table per concrete class (implicit polymorphism) |
<any> |
not supported |
not supported |
<many-to-any> |
s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult() |
from Payment p |
not supported |
not supported |