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.
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.
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.