Groupe pour l'envoie d'email pour vote majoritaire

This commit is contained in:
Arimihanta 2021-07-12 20:16:08 +03:00
parent d203235530
commit ab1f30e718
2 changed files with 5 additions and 4 deletions

View file

@ -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;
}

View file

@ -33,7 +33,7 @@ public class VMTeamService extends AbstractService<VMTeam> {
private TypedQuery<VMTeam> generateQuery(Long teamId){
TypedQuery<VMTeam> 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 ")