在做一个电子商务网站,结果customer类和order类用Hibernate进行映射时,报错
Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com.mimile.bean.Customer.orders[org.hibernate.criterion.Order]
网上找了很多方法,包括检查spring配置文件,@Entity注释,发现都配置正确,没有问题,最后认真看了一下,发现自己的Order类与org.hibernate.criterion.Order冲突,重命名即解决。
在做一个电子商务网站,结果customer类和order类用Hibernate进行映射时,