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

时间:2022-07-22 15:03:00

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)]