sebtrif / hibernate-sqlite

Automatically exported from code.google.com/p/hibernate-sqlite
0 stars 0 forks source link

org.hibernate.MappingException: No Dialect mapping for JDBC type: 0 #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
query.list has no result 
expetion is 
org.hibernate.MappingException: No Dialect mapping for JDBC type: 0 

Original issue reported on code.google.com by hcqen...@gmail.com on 2 Dec 2009 at 8:08

GoogleCodeExporter commented 8 years ago
The same is happening to me with the latest release.
I have created a table: 
CREATE TABLE foo (bar VARCHAR(30));

And when I query it with:
SELECT bar FROM foo;

I get:

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

Original comment by ionat...@gmail.com on 6 May 2010 at 12:09

GoogleCodeExporter commented 8 years ago
On modifying the SQLiteDialect class as shown below, I'm able to overcome the 
discussed problem.

public class SQLiteDialect extends Dialect {
    public SQLiteDialect() {
        super();
        ...
        ...
        ...
        registerColumnType(Types.NULL, "null");
        registerHibernateType(Types.NULL, "null");
    }
    ...
    ...
}

Original comment by sangeeth...@gmail.com on 13 Jul 2010 at 10:20