File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
backend/src/main/java/ch/xxx/maps/domain/model/entity Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public class CompanySite extends BaseEntity{
30
30
private String title ;
31
31
@ NotNull
32
32
private LocalDate atDate ;
33
- @ OneToMany (mappedBy = "companySite" , cascade = CascadeType .ALL , fetch = FetchType .LAZY )
33
+ @ OneToMany (mappedBy = "companySite" , cascade = CascadeType .MERGE , fetch = FetchType .LAZY )
34
34
private Set <Polygon > polygons = new LinkedHashSet <>();
35
35
36
36
public Set <Polygon > getPolygons () {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public class Polygon extends BaseEntity {
31
31
private String title ;
32
32
private BigDecimal longitude ;
33
33
private BigDecimal latitude ;
34
- @ OneToMany (mappedBy = "polygon" , cascade = CascadeType .ALL , fetch = FetchType .LAZY )
34
+ @ OneToMany (mappedBy = "polygon" , cascade = CascadeType .MERGE , fetch = FetchType .LAZY )
35
35
private Set <Ring > rings = new LinkedHashSet <>();
36
36
@ ManyToOne (fetch = FetchType .LAZY )
37
37
@ JoinColumn (name = "company_site_id" )
Original file line number Diff line number Diff line change 26
26
@ Entity
27
27
public class Ring extends BaseEntity {
28
28
private boolean primaryRing ;
29
- @ OneToMany (mappedBy = "ring" , cascade = CascadeType .ALL , fetch = FetchType .LAZY )
29
+ @ OneToMany (mappedBy = "ring" , cascade = CascadeType .MERGE , fetch = FetchType .LAZY )
30
30
private Set <Location > locations = new LinkedHashSet <>();
31
31
@ ManyToOne (fetch = FetchType .LAZY , optional = true )
32
32
@ JoinColumn (name = "polygon_id" )
You can’t perform that action at this time.
0 commit comments