Fix CascadeType.REMOVE on ManyToOne (#2030)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-15 13:11:46 +02:00
committed by GitHub
parent 2d0c0a5989
commit 444c812bc2

View File

@@ -44,12 +44,12 @@ public class DistributionSetTypeElement implements Serializable {
private boolean mandatory;
@MapsId("dsType")
@ManyToOne(optional = false, fetch = FetchType.LAZY, cascade = { CascadeType.REMOVE })
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumn(name = "distribution_set_type", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_ds_type_element_element"))
private JpaDistributionSetType dsType;
@MapsId("smType")
@ManyToOne(optional = false, fetch = FetchType.LAZY, cascade = { CascadeType.REMOVE })
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumn(name = "software_module_type", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_ds_type_element_smtype"))
private JpaSoftwareModuleType smType;