diff --git a/src/main/java/com/gamedoora/model/dao/Skills.java b/src/main/java/com/gamedoora/model/dao/Skills.java index f783da45..9372765f 100644 --- a/src/main/java/com/gamedoora/model/dao/Skills.java +++ b/src/main/java/com/gamedoora/model/dao/Skills.java @@ -54,8 +54,8 @@ public class Skills extends Audit implements Serializable { @JoinTable(name = "skills_sources", joinColumns = @JoinColumn(name = "skill_id"), inverseJoinColumns = @JoinColumn(name = "source_id")) Set sources; - @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinTable(name = "roles_skills", joinColumns = @JoinColumn(name = "role_id"), inverseJoinColumns = @JoinColumn(name = "skill_id")) + @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "skills") + //@JoinTable(name = "roles_skills", joinColumns = @JoinColumn(name = "role_id"), inverseJoinColumns = @JoinColumn(name = "skill_id")) Set roles; public long getId() { diff --git a/src/main/java/com/gamedoora/model/dto/GdUser.java b/src/main/java/com/gamedoora/model/dto/GdUser.java new file mode 100644 index 00000000..f2ea4c45 --- /dev/null +++ b/src/main/java/com/gamedoora/model/dto/GdUser.java @@ -0,0 +1,14 @@ +package com.gamedoora.model.dto; + +import lombok.*; + +import java.util.List; + + +@EqualsAndHashCode(callSuper = false) +@Builder +public class GdUser { + private List roles; + private List skills; + private UserDTO user; +}