Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ERROR: org.hibernate.tool.hbm2ddl.SchemaUpdate - HHH000388: Unsuccessful: create table User (idUser bigserial not null, dateDerniereConnexion timestamp, email varchar(255), grade varchar(255), login varchar(255), mdp varchar(255), nomUser varchar(255), tel varchar(255), idEquipe int8, idRole int8, primary key (idUser))
- ERROR: org.hibernate.tool.hbm2ddl.SchemaUpdate - ERREUR: erreur de syntaxe sur ou près de « User »
- Position : 14
- ERROR: org.hibernate.tool.hbm2ddl.SchemaUpdate - HHH000388: Unsuccessful: alter table MembreTache add constraint FK4EC6FEB35B0BF9EE foreign key (idUser) references User
- ERROR: org.hibernate.tool.hbm2ddl.SchemaUpdate - ERREUR: erreur de syntaxe sur ou près de « User »
- Position : 91
- public class User implements Serializable {
- private static final long serialVersionUID = 3954206400422372693L;
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- private Long idUser;
- @ManyToOne
- @JoinColumn(name="idRole")
- private Role role;
- private String nomUser;
- private String grade;
- private String tel;
- private String email;
- private Date dateDerniereConnexion;
- private String login;
- private String mdp;
- @ManyToOne
- @JoinColumn(name="idEquipe")
- private EquipeProjet equipe;
- @OneToMany(mappedBy="user")
- private Collection<MembreTache> membreTache;
- /*----------*/
- public User(Role role, String nomUser, String grade, String tel, String email,
- Date dateDerniereConnexion, String login, String mdp) {
- super();
- this.role = role;
- this.nomUser = nomUser;
- this.grade = grade;
- this.tel = tel;
- this.email = email;
- this.dateDerniereConnexion = dateDerniereConnexion;
- this.login = login;
- this.mdp = mdp;
- }
- }
- and this is the class EquipeProjet:
- package com.gestion.projet.entities;
- @Entity
- @Table(name="EquipeProjet")
- public class EquipeProjet implements Serializable{
- /**
- *
- */
- private static final long serialVersionUID = 2L;
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- private Long idEquipe;
- private int nbrMmbre;
- @OneToMany(mappedBy="equipe")
- private Collection<User> user;
- public Long getIdEquipe() {
- return idEquipe;
- }
- public EquipeProjet() {
- super();
- }
- }
- @Entity
- @Table(name="MembreTache")
- public class MembreTache implements Serializable {
- /**
- *
- */
- private static final long serialVersionUID = 995686353843852683L;
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- private Long idMembreTache;
- @ManyToOne
- @JoinColumn(name="idTache")
- private Tache tache;
- @ManyToOne
- @JoinColumn(name="idUser")
- private User user;
- private int travailEffecuter;
- private int travailRestant;
- /*-------le constructeur,les getter et setter------*/
- public Long getIdMembreTache() {
- return idMembreTache;
- }
- public int getTravailEffecuter() {
- return travailEffecuter;
- }
- public void setTravailEffecuter(int travailEffecuter) {
- this.travailEffecuter = travailEffecuter;
- }
- public int getTravailRestant() {
- return travailRestant;
- }
- public void setTravailRestant(int travailRestant) {
- this.travailRestant = travailRestant;
- }
- public MembreTache() {
- super();
- }
- public MembreTache( Tache tache, User user,
- int travailEffecuter, int travailRestant) {
- super();
- this.tache = tache;
- this.user = user;
- this.travailEffecuter = travailEffecuter;
- this.travailRestant = travailRestant;
- }
- }
- @Entity
- @Table(name="Tache")
- public class Tache implements Serializable{
- /**
- *
- */
- private static final long serialVersionUID = 8616227436464089403L;
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- private Long idTache;
- private String nomTache;
- private String statusTache;
- private Date dateDebut;
- private Date dateFin;
- @ManyToOne
- @JoinColumn(name="parent_tache_id")
- private Tache tacheParente;
- private Long predecesseur;
- private Long durre;
- private String commentaire;
- private String type ;
- private boolean confidentialite;
- @ManyToOne
- @JoinColumn(name="idPhase")
- private Phase phase;
- @OneToMany(mappedBy="tache")
- private Collection<MembreTache> membreTache;
- public Tache(String nomTache, String statusTache, Date dateDebut,
- Date dateFin, Tache tacheParente, Long predecesseur, Long durre,
- String commentaire, String type, boolean confidentialite) {
- super();
- this.nomTache = nomTache;
- this.statusTache = statusTache;
- this.dateDebut = dateDebut;
- this.dateFin = dateFin;
- this.tacheParente = tacheParente;
- this.predecesseur = predecesseur;
- this.durre = durre;
- this.commentaire = commentaire;
- this.type = type;
- this.confidentialite = confidentialite;
- }
- public String getNomTache() {
- return nomTache;
- }
- }
- @Column(name = "`from`")
- private String from;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement