Inheritance mapping

The three strategies

It is possible to define subclass, union-subclass, and joined-subclass

Read More →

Caching in Hibernate With working object

CacheRetrieveMode controls how Hibernate accesses

Read More →

Table per class hierarchy

Suppose we have an interface Payment with the implementors CreditCardPayment,

Read More →

Table per subclass

The three subclass tables have primary key associations to the superclass table so

Read More →

Table per subclass: using a discriminator

The approach taken by Hibernate is much more difficult to implement, but arguably more correct from.

Read More →

Mixing table per class hierarchy with table per subclass

For any of these mapping strategies, a polymorphic association to the root Payment class is

Read More →

Table per concrete class

The limitation of this approach is that if a property is mapped on the superclass,

Read More →

Table per concrete class using implicit polymorphism

The disadvantage of this approach is that Hibernate does not generate SQL UNIONs when performing polymorphic queries.

Read More →

Mixing implicit polymorphism with other inheritance mappings

Once again, Payment is not mentioned explicitly. If we execute a query against the Payment interface,

Read More →

Limitations

There are limitations to the \\

Read More →

The three strategies

It is possible to define subclass, union-subclass, and joined-subclass

Read More →

Caching in Hibernate With working object

CacheRetrieveMode controls how Hibernate accesses

Read More →

Table per class hierarchy

Suppose we have an interface Payment with the implementors CreditCardPayment,

Read More →

Table per subclass

The three subclass tables have primary key associations to the superclass table so

Read More →

Table per subclass: using a discriminator

The approach taken by Hibernate is much more difficult to implement, but arguably more correct from.

Read More →

Mixing table per class hierarchy with table per subclass

For any of these mapping strategies, a polymorphic association to the root Payment class is

Read More →

Table per concrete class

The limitation of this approach is that if a property is mapped on the superclass,

Read More →

Table per concrete class using implicit polymorphism

The disadvantage of this approach is that Hibernate does not generate SQL UNIONs when performing polymorphic queries.

Read More →

Mixing implicit polymorphism with other inheritance mappings

Once again, Payment is not mentioned explicitly. If we execute a query against the Payment interface,

Read More →

Limitations

There are limitations to the \\

Read More →
Inheritance mapping,The three strategies,Caching in Hibernate With working object,Table per class hierarchy,Table per subclass,Table per subclass: using a discriminator,Mixing table per class hierarchy with table per subclass,Table per concrete class,Table per concrete class using implicit polymorphism,Mixing implicit polymorphism with other inheritance mappings,Limitations,The three strategies,Caching in Hibernate With working object,Table per class hierarchy,Table per subclass,Table per subclass: using a discriminator,Mixing table per class hierarchy with table per subclass,Table per concrete class,Table per concrete class using implicit polymorphism,Mixing implicit polymorphism with other inheritance mappings,Limitations