开发者

SQL Query in Hibernate

开发者 https://www.devze.com 2023-03-01 12:57 出处:网络
I\'m carrying out a SQL query which looks like: SELECT thi.* FROM track_history_items thi JOIN artists art

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

精彩评论

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