readem + correction

This commit is contained in:
trochas
2025-10-23 22:21:36 +02:00
parent 3f0e3c801c
commit 7c71555add
7 changed files with 72 additions and 42 deletions

View File

@@ -23,7 +23,7 @@ public class Quizz implements Serializable {
@ManyToOne
@JoinColumn(name="id_utilisateur")
private Utilisateur utilisateur;
private Utilisateur createur;
@OneToMany(mappedBy = "quizz")
private List<Question> questions=new ArrayList<Question>();

View File

@@ -32,4 +32,14 @@ public abstract class Reponse implements Serializable {
public String prettyPrinter(int tab){
return "";
}
public String toString(){
String res = "[";
for (int i = 0; i<this.reponses.size(); i++) {
res += this.reponses.get(i);
if(i<this.reponses.size()-1) res+= ", ";
}
res += "]";
return res;
}
}

View File

@@ -32,6 +32,6 @@ public class Utilisateur implements Serializable {
)
private List<Session> sessions= new ArrayList<>();
@OneToMany(mappedBy = "utilisateur")
@OneToMany(mappedBy = "createur")
private List<Quizz> quizzs = new ArrayList<>();
}