Creat a package-info file in the models package and put the following contents in there:
@org.hibernate.annotations.TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
package com.ourproject.model;
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
I used JsonBinaryType
in hibernate-types-52
library.
Then in the entity class, I removed columnDefinition="jsonb"
from the @Column
and only used @Type(type = "jsonb")