JPA @ManyToMany与LIsts列表

时间:2016-08-22 19:39:25

标签: hibernate mapping

嗨,大家好,我需要帮助..

class model{
@ManyToMany(cascade=CascadeType.PERSIST, fetch=FetchType.EAGER)
@JoinTable(
          name="MOD_KOMP",
          joinColumns=@JoinColumn(name="MOD_ID", referencedColumnName="ID"),
          inverseJoinColumns=@JoinColumn(name="KOMP_ID", referencedColumnName="ID"))
private List<List<KatalogKomponente>> katalogKomponentenListe;}

}

class KatalogKomponente{@JsonIgnore
@ManyToMany(mappedBy="katalogKomponentenListe", fetch=FetchType.EAGER, cascade=CascadeType.REMOVE)
private List<Model> _modele;}

错误MSG:由以下原因引起:org.hibernate.AnnotationException:使用@OneToMany或@ManyToMany定位未映射的类:com.bf.scm.schuhverwaltung.model.Model.katalogKomponentenListe [java.util.List]

问题是什么?我不明白......

THX

0 个答案:

没有答案