Eclipse RCP读书笔记(六)
Derby的新版本有变化,导致一些以前能运行的东西现在会出错下面的对其中的一个问题有详细的讨论
http://www.nabble.com/Derby-complains-on-SQL-that-has-ORDER-BY-that-order-column-is-not-in-query-result,-but-it's-there-td14982335.html
但没有给出解决问题的方法?
总之,问题出在derby和hibernate结合的时候,hibernate生成的sql语句的问题
例如:
出现错误
The ORDER BY clause may not contain column 'xxxx', since the query specifies DISTINCT and that column does not appear in the query result."
问题出在hibernate产生的sql语句中。(配置文件中输出sql的配置项 show_sql)
=========================
目前看来,最简单的解决问题的方法是使用稍微早点的版本的Derby,例如10.2.1(也是书中采用的版本)
页:
[1]