Hibernate查詢錯誤

         我們最近一個項目用hibernate+Spring做,系統的學習了一下,並把自己出現的問題記下來,供以後參考。

問題: org.springframework.orm.hibernate3.HibernateQueryException: mora_b2c_customer is not mapped [from mora_b2c_customer where devno like '%132%']; nested exception is org.hibernate.hql.ast.QuerySyntaxException: mora_b2c_customer is not mapped [from mora_b2c_customer where devno like '%132%']

原因:hibernate 中HQL語言是對象查詢,映射java中的屬性,把mora_b2c_customer表名改成Customer類名就沒有問題了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章