jap报错:org.hibernate.MappingException: Could not determine type for:

最近在重新写一个系统。2个实体项目、合同,项目与合同为一对多的关系。在合同中定义关联列:projectid,在TEST时,总是提示:org.hibernate.MappingException: Could not determine type for:。。。。

自己找了很长的时间都没有找出原因,后来在这篇文章:

hibernate用注解 一对多 报Could not determine type for错误(http://www.iteye.com/problems/48948)

指出:注解要么都写在属性上,要么都写在GET方法上。

问题终于解决,再次特别感谢上文作者。

 

posted on 2017-06-15 17:04  翻身的螃蟹  阅读(335)  评论(0编辑  收藏  举报