Use of @OneToMany or @ManyToMany targeting an unmapped class: com.jason.model.MRequirement.mexecutor

hibernate 出现这个错:

Use of @OneToMany or @ManyToMany targeting an unmapped class: com.jason.model.MRequirement.mexecutors[com.jason.model.MExecutor]


解决方案:

查看Entity的引用是来自于哪个包,我的引用org.hibernate...就出现这个错,换成javax.persistence.Entity就没有这个错了

你可能感兴趣的:(Use of @OneToMany or @ManyToMany targeting an unmapped class: com.jason.model.MRequirement.mexecutor)