今天配置实体类注解时,出现以下错误:
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: ss_user, for columns: [org.hibernate.mapping.Column(role_list)]
解决方案:注解要么写在字段上,要么写在getXX上,千万千万不能混合使用,否则会报这个错误!
本文解决了一个关于Hibernate框架中实体类注解配置导致的MappingException错误。问题出现在将注解混合写在字段及其getter方法上,正确的做法是选择其一进行注解。
今天配置实体类注解时,出现以下错误:
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: ss_user, for columns: [org.hibernate.mapping.Column(role_list)]
解决方案:注解要么写在字段上,要么写在getXX上,千万千万不能混合使用,否则会报这个错误!
233

被折叠的 条评论
为什么被折叠?
