No mapping for LONGVARCHAR in Hibernate 3.2

Posted by jimbokun on Stack Overflow See other posts from Stack Overflow or by jimbokun
Published on 2010-02-24T15:00:43Z Indexed on 2010/05/02 16:58 UTC
Read the original article Hit count: 158

Filed under:
|
|
|
|

I am running Hibernate 3.2.0 with MySQL 5.1. After updating the group_concat_max_len in MySQL (because of a group_concat query that was exceeding the default value), I got the following exception when executing a SQLQuery with a group_concat clause:

"No Dialect mapping for JDBC type: -1"

-1 is the java.sql.Types value for LONGVARCHAR. Evidently, increasing the group_concat_max_len value causes calls to group_concat to return a LONGVARCHAR value. This appears to be an instance of this bug:

http://opensource.atlassian.com/projects/hibernate/browse/HHH-3892

I guess there is a fix for this issue in Hibernate 3.5, but that is still a development version, so I am hesitant to put it into production, and don't know if it would cause issues for other parts of my code base. I could also just use JDBC queries, but then I have to replace every instance of a SQLQuery with a group_concat clause.

Any other suggestions?

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about mysql