corrections
This commit is contained in:
@@ -17,7 +17,7 @@ public class Question implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
private String question;
|
||||
private String enonce;
|
||||
|
||||
@OneToOne(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name ="bonne_reponse", referencedColumnName = "id")
|
||||
|
||||
@@ -20,12 +20,12 @@ public class Quizz implements Serializable {
|
||||
@GeneratedValue
|
||||
private int id;
|
||||
|
||||
@ManyToOne
|
||||
private Session session;
|
||||
@ManyToMany
|
||||
private List<Session> sessions;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name="id_utilisateur")
|
||||
private Utilisateur utilisateur;
|
||||
private Utilisateur createur;
|
||||
|
||||
@OneToMany(mappedBy = "quizz")
|
||||
private List<Question> questions=new ArrayList<Question>();
|
||||
|
||||
@@ -23,10 +23,10 @@ public class Session implements Serializable {
|
||||
@Column(unique=true)
|
||||
private int codePIN;
|
||||
|
||||
@OneToMany(mappedBy="session", fetch = FetchType.EAGER)
|
||||
@ManyToMany(mappedBy="sessions", fetch = FetchType.EAGER)
|
||||
private List<Quizz> quizzs = new ArrayList<>();
|
||||
|
||||
@ManyToMany(mappedBy = "session", fetch = FetchType.EAGER)
|
||||
@ManyToMany(mappedBy = "sessions", fetch = FetchType.EAGER)
|
||||
private List<Utilisateur> utilisateurs = new ArrayList<>();
|
||||
private String theme;
|
||||
}
|
||||
@@ -28,8 +28,8 @@ public class Utilisateur implements Serializable {
|
||||
joinColumns = @JoinColumn(name="utilisateur_id"),
|
||||
inverseJoinColumns = @JoinColumn(name = "session_id")
|
||||
)
|
||||
private List<Session> session= new ArrayList<>();;
|
||||
private List<Session> sessions= new ArrayList<>();;
|
||||
|
||||
@OneToMany(mappedBy = "utilisateur")
|
||||
@OneToMany(mappedBy = "createur")
|
||||
private List<Quizz> quizzs;
|
||||
}
|
||||
Reference in New Issue
Block a user