Use Hibernate Dynamic Update for JSON properties

Introduction In this article, I’m going to explain why you should always use the Hibernate Dynamic Update feature for entities that map JSON properties. Since Hibernate ORM does not offer support for JSON column types, we are going to use the Hibernate Types library, which provides a JsonType that allows you to map String, Map, List, JsonNode, Java Records, or POJOs on JSON columns, no matter if you are using PostgreSQL, MySQL, Oracle, SQL Server, or H2.

How to update only a subset of entity attributes using JPA and Hibernate @DynamicUpdate

Introduction One of my Twitter followers asked me to answer the following question on StackOverflow. This article aims to explain various techniques for controlling the UPDATE SQL statement that is executed whenever an entity is modified by the data access layer.