Tag: Inheritance

Inheritance Mapping In Hibernate – Introduction

Compared to JDBC we have one main advantage in hibernate, which is hibernate inheritance.  Suppose if we have base and derived classes, now if we save derived(sub) class object, base class object will also be stored into the database….

Hibernate Inheritance: Table Per Class Hierarchy

Here is the explanation and one example on hibernate table per class hierarchy, consider we have base class named Payment and 2 derived classes like CreditCard, Cheque If we save the derived class object like CreditCard or Cheque then…

Hibernate Inheritance: Table Per subClass Hierarchy

This is also just like previous example, but some changes are there, in table per class hierarchy all the data was saved in a single table but here, x number of classes = x number of tables in the…

Hibernate Inheritance: Table Per Concrete Class Hierarchy

Something like previous example but the changes are at mapping file only, and one more thing is.. x number of derived classes = x number of tables in the database Once we save the derived class object, then derived…

If you enjoyed this blog, please consider sharing it...!!!
Most Recent Posts from Top Categories
Spring Boot Hibernate Spring
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2025 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.