我有一个父子关系,我想通过链接两个用户实体和user_group来映射两个表 但是,当我将注释AnToMany和其余的注释放入时,会生成此错误。如何解决。
我正在使用Oracle 11g数据库,它返回的错误是:原因:java.sql.SQLSyntaxErrorException:ORA-02267:列类型与引用的列类型不兼容
package com.bni.Gestion_Operation.entities;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
@Entity
public class Groupe_utilisateur implements Serializable {
@Id
@GeneratedValue
private long idGroupe;
private String libelle;
@ManyToMany
@JoinTable(name = "GroupeDroit", joinColumns = @JoinColumn(name = "idGroupe"), inverseJoinColumns = @JoinColumn(name = "idDroit"))
List<Droit> droit;
@OneToMany(mappedBy="idRole")
private List<Role> role;
@OneToMany(mappedBy="matricule",fetch=FetchType.LAZY)
private List<Utilisateur> utilisateur;
}