This blog article is part of a “series of blog articles” about common pitfalls using JPA and ways to avoid them. In this article, we describe issues with using null parameter values.
Continue readingJPA
JPA Pitfalls (6): Query Result with Duplicates
This blog article is part of a “series of blog articles” about common pitfalls using JPA and ways to avoid them. In this article, we describe unexpected duplicates in the result of a JPQL query.
Continue readingPart 2: GraphQL with Spring Boot, JPA and Kotlin
In Part 1 we set up a simple GraphQL backend application using Spring Boot, JPA and Kotlin. In the second part we will discuss best practices for such applications – especially how to test them.
Continue readingJPA Pitfalls (5): Object-Relational Mapping and Inheritance
This blog article is part of a “series of blog articles” about common pitfalls using JPA and ways to avoid them. In this article, we describe possible performance impacts of JPA inheritance mapping strategies.
Continue readingJPA Pitfalls (4): Relationship Owner
This blog article is part of a “series of blog articles” about common pitfalls using JPA and ways to avoid them. In this article, we describe issues with bidirectional relationships.
Continue readingJPA Pitfalls (3): Cascade Persist
This blog article is part of a “series of blog articles” about common pitfalls using JPA and ways to avoid them. In this article, we describe issues of EM.persist with respect to relationships.
Continue readingJPA Pitfalls (2): List or Set Relationship
This blog article is part of a “series of blog articles” about common pitfalls using JPA and ways to avoid them. In this article, we describe the difference between a set or list relationship.
Continue readingJPA Pitfalls (1): Serialized Collection
This blog article is part of a “series of blog articles” about common pitfalls using JPA and ways to avoid them. In this article, we describe, how easily a relation mapped as collection ends up as a blob.
Continue readingJPA Pitfalls – a Series of Serious JPA Obstacles

Most of our Java-based web-applications store their data in a relational database such as Oracle, PostgreSQL, MySQL, MariaDB or MS SQLServer. The standard way to access and modify the data is using an object-relational mapping as specified by the Java Persistence API (JPA). Over the years JPA has become a mature specification and there are a couple of JPA implementations with strong support such as Hibernate, EclipseLink, OpenJPA and DataNucleus. However, day-to-day project experience demonstrates there are number of pitfalls you might run into when using JPA.

To avoid stumbling into the same pitfall again and again, we collected them with their solutions and presented these pairs of problems and solutions. This is a start of a series of blog articles each describing a pitfall and a way to circumvent it.
You must be logged in to post a comment.