I need to execute a sql query with hibernate (without matching), but I keep getting this error whenever a field has a TEXT data type in MYSQL:
org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
I do not know what to do, matching is not an option (dynamic tables in the database, so the number of fields is variable).
Here's the code snippet:
SQLQuery query = session.createSQLQuery(sql); Object[] values = (Object[]) query.uniqueResult();
sql is the string containing the query (it works fine with the mysql query engine). If I change the TEXT data type to varchar, it works fine, but that is not an option!
Any clues?
sql mysql hibernate
gkoloc
source share