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…

JPA CRUD Example

Introduction The tutorial, JPA CRUD, will show you how to use JPA(Java Persistence API) for selecting, inserting, updating and deleting data into/from database. The acronym CRUD means Create, Read, Update and Delete. What is JPA? The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. Pros…