org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111 for jsonobject with custom JsonPostgreSQLDialect

耗尽温柔 提交于 2019-12-11 03:35:59

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!