在Hibernate2.x里Hql支持 not is null 也支持 is not null 但是你打印出SQL語句就可以發現兩者到最后生成的SQL語句都就變成了 is not null
但是在Hibernate3.x里Hql就不支持 not is null 的寫法了,這是公司系統從Hibernate2.x升級到Hibernate3.x時候發現的,所以在Hibernate2.x里還是不要寫成 not is null,
免得升到Hibernate3的時候麻煩
posted on 2009-05-13 10:38 風 閱讀(2125) 評論(0) 編輯 收藏