The best way to use JPA bidirectional sync methods

Introduction In this article, we are going to see what are the best way to use JPA bidirectional sync methods for one-to-many, one-to-one, and many-to-many associations. For an introduction to why you need sync methods for your bidirectional JPA associations, check out this article first.

Soft delete and JPA version property

Introduction In this article, we are going to see how we can implement a soft delete mechanism when the JPA entity features a version property. If you are not using a version property for optimistic locking, then you can implement the soft delete strategy, as explained in this article.

How to customize the HibernateTypesContributor from Hypersistence Utils

Introduction In this article, we are going to see how to customize the HibernateTypesContributor from Hypersistence Utils so that we can disable all or filter out certain Types.

The best way to use one-to-one table relationships

Introduction In this article, we are going to see what is the best way to use one-to-one table relationships. I decided to write this article after reading this Tweet:

The best way to validate the DDL schema with Spring and Hibernate

Introduction In this article, we are going to see what is the best way to validate the DDL schema and the JPA entity mappings when using Spring and Hibernate. I decided to write this article after reading this Tweet:

Hibernate default entity sequence

Introduction In this article, we are going to see how the default entity sequence changes when migrating from Hibernate 5 to Hibernate 6.

The best way to generate a TSID entity identifier with JPA and Hibernate

Introduction In this article, I will show you the best way to generate a TSID entity identifier with JPA and Hibernate. Prior to continuing, if you are not familiar with the advantages of using compact Time-Sorted Identifiers, like TSID, check out this article first.

Scaling a Spring application with a YugabyteDB cluster

Introduction In this article, we are going to see that scaling the data access layer of a Spring application can be done very easily with a YugabyteDB cluster. As I explained in this article, YugabyteDB is an open-source distributed SQL database that offers all the benefits of a typical relational database (e.g., SQL, strong consistency, ACID transactions) with the advantages of a globally-distributed auto-sharded database system (e.g., NoSQL document databases).

From Hibernate Types to Hypersistence Utils

Introduction In this article, I explain why the Hibernate Types became Hypersistence Utils, and how you can migrate your old dependency to Hypersistence Utils 3.0.

Spring Data Hibernate Entity Listeners

Introduction In this article, we are going to see how we can configure Spring Data to register several Hibernate Entity Listeners that can intercept entity state modifications. As I explained in this article, JPA also offers an event listening mechanism that you can configure via the @EntityListeners, @PostPersist or @PostUpdate, or PostRemove annotations. However, the JPA solution is way too limited as it doesn’t allow you to interfere with the EntityManager directly. Therefore, I prefer using the Hibernate Entity Listeners mechanism, which you can easily integrate with Spring Data, as this article… Read More