How to register JsonBinaryType in Hibernate 6

I am upgrading our project to Spring boot 3 and we use Postres JsonTypes in our table columns.
These columns are mapped as JsonBinaryType in Entities.
As part of our unit tests, we use H2Dialect and registered JsonBinaryType as follows:-

  init {
    registerColumnType(Types.OTHER, JsonBinaryType::class.qualifiedName)
    registerHibernateType(Types.OTHER, JsonBinaryType::class.qualifiedName)

How do we achieve the same with Hibernate 6? I dont see any documentation. Can anyone please help.

Simply search for json in the documentation: Hibernate ORM User Guide

1 Like