No Dialect mapping for JDBC type: -1

This Hibernate error came at me out of the blue while working on FilmSuggestions.com - I innocently added a constraint to one of my Grails domain models, setting the maxSize of one of the fields to 2000. This changed the table schema making the column type TEXT instead of VARCHAR.

The problem came from a native query:
sessionFactory.getCurrentSession().createSQLQuery(mostPopularFilmsSQL).list()

This selects the TEXT column which results in the error (as described here). Setting the dialect didn't seem to make any difference, so for now I've changed the constraint so it's back to being a VARCHAR.

Popular posts from this blog

Slow, Buffering, Stuttering Udemy Video

Intellij tip - Joining multiple lines into one

Looking for IT work in Australia? JobReel.com.au!