In this tutorial, we will learn JPA in-depth with Hibernate as Implementation.
JPA stands for Jakarta Persistence API (JPA), formerly known as Java Persistence API.
JPA is just a specification that facilitates object-relational mapping to manage relational data in Java applications. It provides a platform to work directly with objects instead of using SQL statements.
YouTube Video - What is JPA?
Check out top hibernate ORM tutorial at Complete Hibernate TutorialJPA is a specification and several implementations are available. Popular implementations are Hibernate, EclipseLink, and Apache OpenJPA.
JPA Getting Started
- Introduction to the Java Persistence API - In this article, you will learn what is JPA? what is ORM, and an overview of JPA API packages, versions, etc?
- JPA Entity Class Basics - Check out how to create a JPA entity, what are the rules to create a JPA entity, and what are features JPA Entity provides like cascading, lazy, relationships, inheritance, etc.
- JPA Architecture - In this article, we will discuss the architecture(core classes and interfaces of Java Persistence API) of the JPA specification.
- JPA - Obtaining a JPA Database Connection - A connection to a database is represented by an EntityManager instance, which also provides functionality for performing operations on a database.
- Configure JPA with Hibernate Example - The Java Persistence API (a.k.a. JPA) is a Java specification for managing, persisting, and accessing data between objects and relational databases. Hibernate is an ORM (Object Relational Mapping) tool that implements JPA specifications.
- All JPA Annotations: Mapping Annotations - This article provides a quick overview of all JPA mapping annotations quick reference or summary.
- Guide to JPA and Hibernate Cascade Types - Learn various cascade types JPA supports with examples.
- JPA Entity Object Life Cycle - New, Managed, Removed, and Detached - In this article, we will discuss the life cycle of JPA entity objects. Note that during the persistence process an object goes through lifecycle changes.
- What is the Difference Between JPA and Hibernate? // Good to know
JPA Entity Creation
- JPA Entity Class Basics - Check out how to create a JPA entity, what are the rules to create a JPA entity, and what are features JPA Entity provides like cascading, lazy, relationships, inheritance, etc.
- Guide to JPA and Hibernate Cascade Types - JPA allows you to propagate the state transition from a parent entity to a child. This article describes all cascade types with an example.
- Hibernate/JPA - Primary Key Generation Strategies - Let's discuss 4 different primary key generation strategies which generate the primary key values programmatically or use database features, like auto-incremented columns or sequences.
- Hibernate 5 - Enum Type Mapping Example - In this article, we will show you how a Java enum type is persisted into a database.
- Hibernate Component Mapping Using @Embeddable and @Embedded Annotation - With Hibernate we can use the @Embeddable annotation to mark a class to be eligible as an embeddable class.
JPA/Hibernate Association Mapping
JPA Operations
JPA Core Interfaces
Inheritance Mapping
- Hibernate/JPA - Inheritance Mapping - In this article, we will learn 4 inheritance strategies with examples.
- Hibernate/JPA MappedSuperclass Inheritance Example - The JPA standard specification defines the @MappedSuperclass annotation to allow an entity to inherit properties from a base class.
- Hibernate/JPA Single Table Inheritance Example - In this article, we will discuss The single table strategy which maps all entities of the inheritance structure to the same database table.
- Hibernate JPA Joined Table Inheritance Example - In this article, we will discuss The Joined table strategy or table-per-subclass mapping strategy.
- Hibernate/JPA Table Per Class Inheritance Example - In this article, we’ll look into Hibernate/JPA table per class inheritance.
JPA Interview Preparation
- JPA Interview Questions and Answers for Beginners and Experienced - In this article, we will discuss important Java Persistence API interview questions and answers.
- What is the Difference Between JPA and Hibernate? - An important interview question asked in many technical interviews.
Great! Thanks for sharing your examples.
ReplyDeletevery Useful
ReplyDelete