`

Person类对应的 Person.hbm.xml 未注册到 hibernate.cfg.xml 出现的异常

阅读更多

废话不多说,先把异常贴出:

org.hibernate.hql.ast.QuerySyntaxException: Person is not mapped [select count(*) from Person]

找了一会儿,原来是没有将 Person类对应的 Person.hbm.xml 注册到 hibernate.cfg.xml

于是在 hibernate.cfg.xml  中加上

<mapping resource="com/hiaward/oa/model/Person.hbm.xml"/>

后,解决此异常。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics