Hibernate注解错误之- org.hibernate.MappingException: Could not determine type for:

Hibernate 注解 @OneToOne 时候,出现以下错误,经调试,发现 注解要么全部放在字段上,要么全部放在get方法上,不能混合使用!

org.hibernate.MappingException: Could not determine type for: com.oto.entity.IdCard, at table: Student, for columns: [org.hibernate.mapping.Column(card)]
 

posted @ 2016-03-22 14:09  慕童  阅读(1268)  评论(0编辑  收藏  举报