mirror of
https://github.com/ArenMg/aren.git
synced 2024-11-21 16:10:52 +00:00
Groupe pour l'envoie d'email pour vote majoritaire
This commit is contained in:
parent
d203235530
commit
ab1f30e718
2 changed files with 5 additions and 4 deletions
|
@ -3,6 +3,7 @@ package fr.lirmm.aren.model.vm;
|
||||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||||
import fr.lirmm.aren.model.AbstractEntity;
|
import fr.lirmm.aren.model.AbstractEntity;
|
||||||
|
import fr.lirmm.aren.model.Team;
|
||||||
import fr.lirmm.aren.model.User;
|
import fr.lirmm.aren.model.User;
|
||||||
import org.hibernate.annotations.Type;
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
@ -31,7 +32,7 @@ public class VMTheme extends AbstractEntity implements Serializable {
|
||||||
|
|
||||||
@JoinColumn(name = "team", referencedColumnName = "id")
|
@JoinColumn(name = "team", referencedColumnName = "id")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private VMTeam team;
|
private Team team;
|
||||||
|
|
||||||
@Size(max = 255)
|
@Size(max = 255)
|
||||||
@Column(name = "title")
|
@Column(name = "title")
|
||||||
|
@ -71,7 +72,7 @@ public class VMTheme extends AbstractEntity implements Serializable {
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public VMTeam getTeam() {
|
public Team getTeam() {
|
||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ public class VMTheme extends AbstractEntity implements Serializable {
|
||||||
*
|
*
|
||||||
* @param team
|
* @param team
|
||||||
*/
|
*/
|
||||||
public void setTeam(VMTeam team) {
|
public void setTeam(Team team) {
|
||||||
this.team = team;
|
this.team = team;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class VMTeamService extends AbstractService<VMTeam> {
|
||||||
private TypedQuery<VMTeam> generateQuery(Long teamId){
|
private TypedQuery<VMTeam> generateQuery(Long teamId){
|
||||||
TypedQuery<VMTeam> query = getEntityManager().createQuery("SELECT vmt "
|
TypedQuery<VMTeam> query = getEntityManager().createQuery("SELECT vmt "
|
||||||
+"FROM VMTeam vmt "
|
+"FROM VMTeam vmt "
|
||||||
+"LEFT JOIN FETCH vmt.members m "
|
+"LEFT JOIN vmt.members m "
|
||||||
+ (teamId != null
|
+ (teamId != null
|
||||||
? "WHERE vmt.id = :teamId "
|
? "WHERE vmt.id = :teamId "
|
||||||
: "WHERE vmt.id IS NOT NULL ")
|
: "WHERE vmt.id IS NOT NULL ")
|
||||||
|
|
Loading…
Reference in a new issue