首页 > 代码库 > hibernate 错误 could not determine type for

hibernate 错误 could not determine type for

今天配置实体类注解时,出现以下错误:

org.hibernate.MappingException: Could not determine type for: com.oneToOne.IdCard, at table: T_Students, for columns: 
解决方案:注解要么写在字段上,要么写在getXX上,千万千万不能混合使用,否则会报这个错误!

hibernate 错误 could not determine type for