我有3个实体,我想使用JPA和EclipseLink将它们添加到PostgreSql中的表中,这些类之间存在相关性,我怀疑我的项目中缺少jar文件:
这是第一个班级:
@Entity
@Table(name = "GROUPE", catalog = "", schema = "SYNCPKTME")
@NamedQueries({
@NamedQuery(name = "Groupe.findAll", query = "SELECT g FROM Groupe g")})
public class Groupe implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@NotNull
@Column(name = "IDGROUPE")
private BigDecimal idgroupe;
@Size(max = 45)
@Column(name = "NOMGROUPE")
private String nomgroupe;
@Size(max = 45)
@Column(name = "LIBELLE")
private String libelle;
@Size(max = 10)
@Column(name = "CREE_PAR")
private String creePar;
@Column(name = "DATE_CREATION")
@Temporal(TemporalType.TIMESTAMP)
private Date dateCreation;
@Size(max = 45)
@Column(name = "MAJ_PAR")
private String majPar;
@Column(name = "DATE_MAJ")
@Temporal(TemporalType.TIMESTAMP)
private Date dateMaj;
@OneToMany(mappedBy = "idgroupe")
private List<PersonneGroupe> personneGroupeList;
public Groupe() {
}....
这是第二类:PERSON
@Entity
@Table(name = "PERSONNE", schema = "SYNCPKTME")
public class Personne implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@NotNull
@Column(name = "IDPERSONNE")
private BigDecimal idpersonne;
@Size(max = 10)
@Column(name = "MATRICULE")
private String matricule;
@Size(max = 45)
@Column(name = "NOM")
private String nom;
@Size(max = 45)
@Column(name = "PRENOM")
private String prenom;
@Size(max = 45)
@Column(name = "UTILISATEUR")
private String utilisateur;
@Size(max = 10)
@Column(name = "CREE_PAR")
private String creePar;
@Column(name = "DATE_CREATION")
@Temporal(TemporalType.TIMESTAMP)
private Date dateCreation;
@Size(max = 45)
@Column(name = "MAJ_PAR")
private String majPar;
@Column(name = "DATE_MAJ")
@Temporal(TemporalType.TIMESTAMP)
private Date dateMaj;
@OneToMany(mappedBy = "idpersonne")
private List<PersonneGroupe> personneGroupeList;....
当我试图从实体生成表格时,这些是由JPA TOOL引起的错误,我真的需要你的帮助,因为我知道我是这个领域的新手。