I have got ManyToMany Relation Ship
@ManyToMany
@JoinTable(name = "competition_tag",
joinColumns = @JoinColumn(name = "competition_id"),
inverseJoinColumns = @JoinColumn(name = "tag_id"))
private Set<CompetitionTags> tags = new HashSet<>();
public void addTagToCompetition(CompetitionTags competitionTags) {
this.tags.add(competitionTags);
competitionTags.getCompetitions().add(this);
}
But when i use addTagToCompetition I getting NullPointerException. Can you please give me any advice/tip why this happen. I add whole object. If this will be needed , whole class is on : github link