今天配置实体类注解时,出现以下错误:
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: ss_user, for columns: [org.hibernate.mapping.Column(role_Set)]
解决方案:注解要么一律写在字段上,要么全部写在getXX上,切忌不能混合使用,否则会报错!
本文共 274 字,大约阅读时间需要 1 分钟。
今天配置实体类注解时,出现以下错误:
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: ss_user, for columns: [org.hibernate.mapping.Column(role_Set)]
解决方案:注解要么一律写在字段上,要么全部写在getXX上,切忌不能混合使用,否则会报错!
转载于:https://blog.51cto.com/yantaiguanyue/1388533