开发者

SQL Query in Hibernate

I'm carrying out a SQL query which looks like:

SELECT thi.*
FROM track_history_items thi
JOIN artists art
  ON thi.artist_id = art.id
WHERE thi.type = TrackBroadcast
Group By art.name
ORDER thi.created_at DESC

This works fine when I run it directly on my database from MySql Workbench, but when I 开发者_StackOverflow社区run in through Hibernate, I get a No Dialect mapping for JDBC type: -1 error.

Anyone have any ideas what could be causing it?


Probably one or more of the columns in the query is not supported by the mysql dialect... try expanding the * and add one column at a time until you find the offending one.

Then it is just a matter of deciding whether you need that column or not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜