问题
1) I added custom dialect by extending PostgreSQL9Dialect which does this.registerColumnType(Types.JAVA_OBJECT, "jsonb");
2) public class JSONObjectUserType implements UserType { }
3) property name="xxxx" type="org.JSONObjectUserType" length="1000"
4) I run hibernate native SQL query.
SQLQuery query1 = (SQLQuery) session.createSQLQuery(str.toString());
It is giving No Dialect mapping for JDBC type: 1111. str = "Select state from X"
Postgresql - column state is of type jsonb.
来源:https://stackoverflow.com/questions/32147303/org-hibernate-mappingexception-no-dialect-mapping-for-jdbc-type-1111-for-jsono