Questo contenuto non è disponibile nella lingua selezionata.

10.2. 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.
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat