From ab1f30e71865e6c6ec7bc61792be19bd201a1c48 Mon Sep 17 00:00:00 2001 From: Arimihanta Date: Mon, 12 Jul 2021 20:16:08 +0300 Subject: [PATCH] Groupe pour l'envoie d'email pour vote majoritaire --- src/main/java/fr/lirmm/aren/model/vm/VMTheme.java | 7 ++++--- src/main/java/fr/lirmm/aren/service/vm/VMTeamService.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/fr/lirmm/aren/model/vm/VMTheme.java b/src/main/java/fr/lirmm/aren/model/vm/VMTheme.java index bf0dfc6..e01973b 100644 --- a/src/main/java/fr/lirmm/aren/model/vm/VMTheme.java +++ b/src/main/java/fr/lirmm/aren/model/vm/VMTheme.java @@ -3,6 +3,7 @@ package fr.lirmm.aren.model.vm; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.ObjectIdGenerators; import fr.lirmm.aren.model.AbstractEntity; +import fr.lirmm.aren.model.Team; import fr.lirmm.aren.model.User; import org.hibernate.annotations.Type; @@ -31,7 +32,7 @@ public class VMTheme extends AbstractEntity implements Serializable { @JoinColumn(name = "team", referencedColumnName = "id") @ManyToOne - private VMTeam team; + private Team team; @Size(max = 255) @Column(name = "title") @@ -71,7 +72,7 @@ public class VMTheme extends AbstractEntity implements Serializable { * * @return */ - public VMTeam getTeam() { + public Team getTeam() { return team; } @@ -79,7 +80,7 @@ public class VMTheme extends AbstractEntity implements Serializable { * * @param team */ - public void setTeam(VMTeam team) { + public void setTeam(Team team) { this.team = team; } diff --git a/src/main/java/fr/lirmm/aren/service/vm/VMTeamService.java b/src/main/java/fr/lirmm/aren/service/vm/VMTeamService.java index fe6f6b8..732a132 100644 --- a/src/main/java/fr/lirmm/aren/service/vm/VMTeamService.java +++ b/src/main/java/fr/lirmm/aren/service/vm/VMTeamService.java @@ -33,7 +33,7 @@ public class VMTeamService extends AbstractService { private TypedQuery generateQuery(Long teamId){ TypedQuery query = getEntityManager().createQuery("SELECT vmt " +"FROM VMTeam vmt " - +"LEFT JOIN FETCH vmt.members m " + +"LEFT JOIN vmt.members m " + (teamId != null ? "WHERE vmt.id = :teamId " : "WHERE vmt.id IS NOT NULL ")