No Dialect mapping for JDBC type: 7

Posted on Sunday, June 10, 2007

5


Recently i got this error while working with Postgres and Hibernate.

I had written a SQL query to retrieve data from a table using left outer join. The unit tests on HSQLDB work fine however Hibernate complained with the error

org.hibernate.MappingException: No Dialect mapping for JDBC type: 7

Ideally it can be solved with something like this

public PostgresDialect() {

super();
registerColumnType( Types.FLOAT, “number($p,$s)” );
registerHibernateType(Types.FLOAT, “float”);
}

for my case i resolved it by converting my FLOAT field to DOUBLE in the hibernate mapping file.

Advertisements
Posted in: Hibernate