diff --git a/sonarQuest-backend/src/main/java/com/viadee/sonarquest/entities/Artefact.java b/sonarQuest-backend/src/main/java/com/viadee/sonarquest/entities/Artefact.java index a3cd5184..be0045e2 100644 --- a/sonarQuest-backend/src/main/java/com/viadee/sonarquest/entities/Artefact.java +++ b/sonarQuest-backend/src/main/java/com/viadee/sonarquest/entities/Artefact.java @@ -42,7 +42,7 @@ public class Artefact { @JoinColumn(name = "level_id") private Level minLevel; - @ManyToMany(cascade = CascadeType.MERGE) + @ManyToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST}) @JoinTable(name = "Artefact_Skill", joinColumns = @JoinColumn(name = "artefact_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "skill_id", referencedColumnName = "id")) private List skills;