Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.29 KB | None | 0 0
  1. 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))
  2. ERROR: org.hibernate.tool.hbm2ddl.SchemaUpdate - ERREUR: erreur de syntaxe sur ou près de « User »
  3. Position : 14
  4. ERROR: org.hibernate.tool.hbm2ddl.SchemaUpdate - HHH000388: Unsuccessful: alter table MembreTache add constraint FK4EC6FEB35B0BF9EE foreign key (idUser) references User
  5. ERROR: org.hibernate.tool.hbm2ddl.SchemaUpdate - ERREUR: erreur de syntaxe sur ou près de « User »
  6. Position : 91
  7.  
  8. public class User implements Serializable {
  9.  
  10. private static final long serialVersionUID = 3954206400422372693L;
  11. @Id
  12. @GeneratedValue(strategy=GenerationType.IDENTITY)
  13. private Long idUser;
  14. @ManyToOne
  15. @JoinColumn(name="idRole")
  16. private Role role;
  17. private String nomUser;
  18. private String grade;
  19. private String tel;
  20. private String email;
  21. private Date dateDerniereConnexion;
  22. private String login;
  23. private String mdp;
  24. @ManyToOne
  25. @JoinColumn(name="idEquipe")
  26. private EquipeProjet equipe;
  27. @OneToMany(mappedBy="user")
  28. private Collection<MembreTache> membreTache;
  29. /*----------*/
  30. public User(Role role, String nomUser, String grade, String tel, String email,
  31. Date dateDerniereConnexion, String login, String mdp) {
  32. super();
  33. this.role = role;
  34. this.nomUser = nomUser;
  35. this.grade = grade;
  36. this.tel = tel;
  37. this.email = email;
  38. this.dateDerniereConnexion = dateDerniereConnexion;
  39. this.login = login;
  40. this.mdp = mdp;
  41. }
  42.  
  43.  
  44. }
  45.  
  46. and this is the class EquipeProjet:
  47.  
  48. package com.gestion.projet.entities;
  49.  
  50. @Entity
  51. @Table(name="EquipeProjet")
  52. public class EquipeProjet implements Serializable{
  53. /**
  54. *
  55. */
  56. private static final long serialVersionUID = 2L;
  57. @Id
  58. @GeneratedValue(strategy=GenerationType.IDENTITY)
  59. private Long idEquipe;
  60. private int nbrMmbre;
  61. @OneToMany(mappedBy="equipe")
  62. private Collection<User> user;
  63.  
  64.  
  65. public Long getIdEquipe() {
  66. return idEquipe;
  67. }
  68.  
  69. public EquipeProjet() {
  70. super();
  71.  
  72. }
  73.  
  74.  
  75. }
  76.  
  77. @Entity
  78. @Table(name="MembreTache")
  79. public class MembreTache implements Serializable {
  80. /**
  81. *
  82. */
  83. private static final long serialVersionUID = 995686353843852683L;
  84. @Id
  85. @GeneratedValue(strategy=GenerationType.IDENTITY)
  86. private Long idMembreTache;
  87. @ManyToOne
  88. @JoinColumn(name="idTache")
  89. private Tache tache;
  90. @ManyToOne
  91. @JoinColumn(name="idUser")
  92. private User user;
  93. private int travailEffecuter;
  94. private int travailRestant;
  95.  
  96. /*-------le constructeur,les getter et setter------*/
  97.  
  98. public Long getIdMembreTache() {
  99. return idMembreTache;
  100. }
  101.  
  102. public int getTravailEffecuter() {
  103. return travailEffecuter;
  104. }
  105. public void setTravailEffecuter(int travailEffecuter) {
  106. this.travailEffecuter = travailEffecuter;
  107. }
  108. public int getTravailRestant() {
  109. return travailRestant;
  110. }
  111. public void setTravailRestant(int travailRestant) {
  112. this.travailRestant = travailRestant;
  113. }
  114. public MembreTache() {
  115. super();
  116.  
  117. }
  118.  
  119. public MembreTache( Tache tache, User user,
  120. int travailEffecuter, int travailRestant) {
  121. super();
  122.  
  123. this.tache = tache;
  124. this.user = user;
  125. this.travailEffecuter = travailEffecuter;
  126. this.travailRestant = travailRestant;
  127. }
  128.  
  129.  
  130. }
  131.  
  132. @Entity
  133. @Table(name="Tache")
  134. public class Tache implements Serializable{
  135. /**
  136. *
  137. */
  138. private static final long serialVersionUID = 8616227436464089403L;
  139. @Id
  140. @GeneratedValue(strategy=GenerationType.IDENTITY)
  141. private Long idTache;
  142. private String nomTache;
  143. private String statusTache;
  144. private Date dateDebut;
  145. private Date dateFin;
  146. @ManyToOne
  147. @JoinColumn(name="parent_tache_id")
  148. private Tache tacheParente;
  149. private Long predecesseur;
  150. private Long durre;
  151. private String commentaire;
  152. private String type ;
  153. private boolean confidentialite;
  154. @ManyToOne
  155. @JoinColumn(name="idPhase")
  156. private Phase phase;
  157. @OneToMany(mappedBy="tache")
  158. private Collection<MembreTache> membreTache;
  159.  
  160. public Tache(String nomTache, String statusTache, Date dateDebut,
  161. Date dateFin, Tache tacheParente, Long predecesseur, Long durre,
  162. String commentaire, String type, boolean confidentialite) {
  163. super();
  164. this.nomTache = nomTache;
  165. this.statusTache = statusTache;
  166. this.dateDebut = dateDebut;
  167. this.dateFin = dateFin;
  168. this.tacheParente = tacheParente;
  169. this.predecesseur = predecesseur;
  170. this.durre = durre;
  171. this.commentaire = commentaire;
  172. this.type = type;
  173. this.confidentialite = confidentialite;
  174. }
  175.  
  176. public String getNomTache() {
  177. return nomTache;
  178. }
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185. }
  186.  
  187. @Column(name = "`from`")
  188. private String from;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement