Single-Primary Database Replication

Introduction In this article, I’m going to explain what Single-Primary Database Replication is, and how you can use it to increase both application availability and scale read-only transactions.

High-Performance Java Persistence Newsletter, Issue 10

Introduction Welcome to a new issue of the High-Performance Java Persistence Newsletter in which we share articles, videos, workshops, and StackOverflow answers that are very relevant to any developer who interacts with a database system using Java.

How to generate JPA entity identifier values using a database sequence

Introduction In this article, I’m going to show you how you can generate entity identifier values using a database sequence when using JPA and Hibernate. Using a database sequence is the most efficient Hibernate identifier generation strategy, as it allows you to take advantage of the automatic JDBC batching mechanism.

How to fetch a one-to-many DTO projection with JPA and Hibernate

Introduction In this article, I’m going to show you how you can fetch a one-to-many relationship as a DTO projection when using JPA and Hibernate. While entities make it very easy to fetch additional relationships, when it comes to DTO projections, you need to use a ResultTransformer to achieve this goal.

High-Performance Java Persistence Newsletter, Issue 9

Introduction Welcome to a new issue of the High-Performance Java Persistence Newsletter in which we share articles, videos, workshops, and StackOverflow answers that are very relevant to any developer who interacts with a database system using Java.

ManyToOne JPA and Hibernate association best practices

Introduction In this article, I’m going to show you what is the best way to map a ManyToOne association when using JPA and Hibernate. Since the @ManyToOne association is the most common relationship, knowing how to map it properly will have a significant impact on application performance.