MySQL下使用Hibernate的Query中setMaxResults方法出現錯誤:
System Runtime Error: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
這是因為MySQL不支持top,而是使用了limit!
目前還沒找到解決辦法,不知道為什么Hibernate搞出這玩意,干嗎不轉換一下,還是bug呢!暈!
終于解決了,不是人家的錯誤,而是我自己弄錯了。方言干錯了!失敗!
posted on 2007-12-27 00:47
周銳 閱讀(1063)
評論(0) 編輯 收藏 所屬分類:
Hibernate 、
MySQL