Loading persistence/src/main/java/cz/muni/fi/pa165/icehockeymanager/model/Role.java +14 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.validation.constraints.NotBlank; import java.util.Objects; import java.util.Set; @Entity Loading @@ -28,4 +29,17 @@ public class Role { @ManyToMany(mappedBy = "roles") private Set<User> users; @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Role)) return false; Role role = (Role) o; return Objects.equals(getName(), role.getName()); } @Override public int hashCode() { return Objects.hash(getName()); } } Loading
persistence/src/main/java/cz/muni/fi/pa165/icehockeymanager/model/Role.java +14 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.validation.constraints.NotBlank; import java.util.Objects; import java.util.Set; @Entity Loading @@ -28,4 +29,17 @@ public class Role { @ManyToMany(mappedBy = "roles") private Set<User> users; @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Role)) return false; Role role = (Role) o; return Objects.equals(getName(), role.getName()); } @Override public int hashCode() { return Objects.hash(getName()); } }