Hibernate建表错误,Could not determine type for: java.util.List
今天遇到 Could not determine type for: java.util.List这个错误。
用hibernate 映射好好的竟然出现这个问题 。
我是使用注解来标注的映射关系
仔细查看代码后,发现有个注解写在了字段上,其他的都写在getter方法上。原因就在此:注解要么写在字段上,要么写在getter上,不能混合使用,否则会报这个错误。
发布时间: 2012-09-01 09:33:03 作者: rapoo
Hibernate建表错误,Could not determine type for: java.util.List
今天遇到 Could not determine type for: java.util.List这个错误。
用hibernate 映射好好的竟然出现这个问题 。
我是使用注解来标注的映射关系
仔细查看代码后,发现有个注解写在了字段上,其他的都写在getter方法上。原因就在此:注解要么写在字段上,要么写在getter上,不能混合使用,否则会报这个错误。