This repository shows the use of hibernate-types and in particular the mapping of JSONB data type in Postgres with Hibernate and JPA.
The project is a Gradle one and it uses the following Hibernate Type dependency:
com.vladmihalcea:hibernate-types-52:2.5.0
It consists of the following main packages:
com.example.demo
including the bootstrap StringBoot classcom.example.demo.entity
holding the Sample Entity and an abstract Hibernate class to deal with ID, equals, toString and hashCode.com.example.demo.pojo
including the PoJo class for the JSON propertiescom.example.demo.repository
including the Repositorycom.example.demo.util.postgres.dialect
including the custom dialect for Postgres
##References Mapping JSON collections using JPA and Hibernate Resolving Hibernate No Dialect Mapping - Hibernate Types