I think it would be good idea to add some kind of simulating/stubbing the JSON and JSONB types while in the PostgreSQL mode. It would help a lot in unit testing.
Yes, this is what I actually do. I create those types in the following way.
DROP TYPE json IF EXISTS;
CREATE TYPE json AS text;
DROP TYPE jsonb IF EXISTS;
CREATE TYPE jsonb AS binary;
This works fine on the DDL level but not on the DML one.
When I try to insert a record into the table in which the json column is given I get the exception.
org.hsqldb.HsqlException: incompatible data type in conversion
We might at some point support these types. In the meantime, you can create a TYPE or DOMAIN with the relevant name to simulate them to some extent.
Yes, this is what I actually do. I create those types in the following way.
DROP TYPE json IF EXISTS;
CREATE TYPE json AS text;
DROP TYPE jsonb IF EXISTS;
CREATE TYPE jsonb AS binary;
This works fine on the DDL level but not on the DML one.
When I try to insert a record into the table in which the json column is given I get the exception.
org.hsqldb.HsqlException: incompatible data type in conversion
For mapping the json and jsonb types I am using the Vlad Mihalcea's solution which can be found here https://vladmihalcea.com/2016/06/20/how-to-map-json-objects-using-generic-hibernate-types/.