diff --git a/src/main/kotlin/no/nav/bidrag/behandling/database/datamodell/Behandling.kt b/src/main/kotlin/no/nav/bidrag/behandling/database/datamodell/Behandling.kt index 291db5f83..f3976e8df 100644 --- a/src/main/kotlin/no/nav/bidrag/behandling/database/datamodell/Behandling.kt +++ b/src/main/kotlin/no/nav/bidrag/behandling/database/datamodell/Behandling.kt @@ -77,7 +77,7 @@ class Behandling( @OneToMany( fetch = FetchType.EAGER, mappedBy = "behandling", - cascade = [CascadeType.ALL], + cascade = [CascadeType.MERGE], orphanRemoval = true, ) var inntekter: MutableSet = mutableSetOf(), @@ -98,7 +98,7 @@ class Behandling( @OneToMany( fetch = FetchType.EAGER, mappedBy = "behandling", - cascade = [CascadeType.ALL], + cascade = [CascadeType.MERGE], orphanRemoval = true, ) var utvidetbarnetrygd: MutableSet = mutableSetOf(),