Updatable to false to prevent setting fk to null 59/92359/1
authorPlummer, Brittany <brittany.plummer@att.com>
Wed, 31 Jul 2019 13:30:43 +0000 (08:30 -0500)
committerBenjamin, Max (mb388a) <mb388a@att.com>
Wed, 31 Jul 2019 13:30:44 +0000 (08:30 -0500)
Updatable to false to prevent setting foreign key to null before delete

Issue-ID: SO-2178
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I9b9f94c0d0b56a61cd8b9c56e80e5a3ec4819a50

mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java

index 464cacb..05845dd 100644 (file)
@@ -161,7 +161,7 @@ public abstract class InfraRequests implements java.io.Serializable {
     private String rollbackExtSystemErrorSource;
 
     @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
-    @JoinColumn(name = "SO_REQUEST_ID", referencedColumnName = "REQUEST_ID")
+    @JoinColumn(name = "SO_REQUEST_ID", referencedColumnName = "REQUEST_ID", updatable = false)
     private List<CloudApiRequests> cloudApiRequests = new ArrayList<>();
 
     @ResourceId