Posted in JPA

JPA Inheritance Strategy : Table Per Concrete Class Hierarchy (TABLE_PER_CLASS)

JPA comes with a provision to create tables and populate them as per the Java classes involved in inheritance. JPA offers basically three different approaches to map hierarchical classes – classes involved in inheritance with database tables. Observe, in the above hierarchy, three classes are involved where Person is the super class and Student and Teacher are sub-classes with their…

Continue Reading... JPA Inheritance Strategy : Table Per Concrete Class Hierarchy (TABLE_PER_CLASS)
Posted in JPA

JPA Inheritance Strategy : Table Per Sub-Class Hierarchy (JOINED)

JPA comes with a provision to create tables and populate them as per the Java classes involved in inheritance. JPA offers basically three different approaches to map hierarchical classes – classes involved in inheritance with database tables. Observe, in the above hierarchy, three classes are involved where Person is the super class and Student and Teacher are sub-classes with their…

Continue Reading... JPA Inheritance Strategy : Table Per Sub-Class Hierarchy (JOINED)
Posted in JPA

JPA Inheritance Strategy : Table Per Class Hierarchy (SINGLE_TABLE)

JPA comes with a provision to create tables and populate them as per the Java classes involved in inheritance. JPA offers basically three different approaches to map hierarchical classes – classes involved in inheritance with database tables. Observe, in the above hierarchy, three classes are involved where Person is the super class and Student and Teacher are sub-classes with their…

Continue Reading... JPA Inheritance Strategy : Table Per Class Hierarchy (SINGLE_TABLE)