JPA Tutorials

The Java Persistence API (JPA) is a Java application programming interface specification that describes the management of relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition.

This page lists down all tutorials available on this blog related to JPA.

JPA Basics

Field vs Property vs Mixed Access modes

CRUD Operations

JPA hello world example
Configure JPA without persistence.xml

Find Entity Example
Save/Persist Entity Example
Remove/Delete Entity Example

Many-to-One Entity Mapping Example
One-to-One Entity Mapping Example
One-to-Many Entity Mapping Example
Many-to-Many Entity Mapping Example

Native SELECT SQL Query Example
Native UPDATE SQL Query Example
Native DELETE SQL Query Example
Executing Stored Procedure

Bulk Update and Delete SQL Queries Example
Mapping entity to multiple tables
JPA Pagination Query Example

Embedded Object Example
Collections List Example
Collections HashMap Example

Transaction Management

Transaction Management Tutorial
Container-managed Transactions Example
Bean-managed Transactions Example


Spring hibernate JPA example
How to test JPA DAO layer
How to execute SQL scripts to initialize database at application startup


[Workaround] NotYetImplementedException: Pure native scalar queries are not yet supported
[Solved] HsqlException: data exception: invalid character value for cast
[Solved] org.hibernate.QueryException: Cannot mix named and positional parameters

Happy Learning !!

Was this post helpful?

Join 7000+ Fellow Programmers

Subscribe to get new post notifications, industry updates, best practices, and much more. Directly into your inbox, for free.

1 thought on “JPA Tutorials”

Comments are closed.


A blog about Java and its related technologies, the best practices, algorithms, interview questions, scripting languages, and Python.