I recently answered this question on the Hibernate forum, and since it’s a very good one, I decided to turn it into an article.
In this post, we will describe how the N+1 query issue is generated when using the second-level Hibernate Query Cache.
Continue reading “How to avoid the Hibernate Query Cache N+1 issue”
To get the most out of the relational database in use, you need to make sure the data access layer resonates with the underlying database system.
In this article, we are going to see what you can do to boost up performance when using PostgreSQL with JPA and Hibernate.
Continue reading “9 High-Performance Tips when using PostgreSQL with JPA and Hibernate”
In this article, you are going to find out how to map an immutable entity when using JPA and Hibernate.
If your Domain Model requires that a given entity should not be modified by the data access logic, Hibernate can enforce this requirement if the entity is marked with the
Continue reading “How to map an immutable entity with JPA and Hibernate”
When using PostgreSQL, it’s tempting to use a SERIAL or BIGSERIAL column type to auto-increment Primary Keys.
However, this article will show you that this is not a very good idea when using JPA and Hibernate.
Continue reading “PostgreSQL SERIAL column and Hibernate IDENTITY generator”
In this article, we are going to see how to use a UUID entity identifier that is auto-generated by Hibernate either in the JVM or using database-specific UUID functions.
Post entity looks as follows:
Post entity has a UUID identifier and a title. Now, let’s see how we can map the
Post entity so that the UUID identifier be auto-generated for us.
Continue reading “How to use a JVM or database auto-generated UUID identifier with JPA and Hibernate”