From f1c68cbfc4ebd8d677eea1140fa7afb902850543 Mon Sep 17 00:00:00 2001 From: nuhrberg <48205130+nuhrberg@users.noreply.github.com> Date: Mon, 29 Apr 2019 15:08:20 +0200 Subject: [PATCH] Changed CascadeType from skills in Artefact to MERGE and PERSIST (#218) * Changed CascadeType from skills in Artefact to ALL * Change CascadeType to MERGE and PERSIST --- .../src/main/java/com/viadee/sonarquest/entities/Artefact.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;