Domain model change
[portal.git] / portal-BE / src / main / java / org / onap / portal / domain / db / cr / CrReportEmailSentLog.java
index da87cf7..7a63890 100644 (file)
@@ -40,6 +40,7 @@
 
 package org.onap.portal.domain.db.cr;
 
+import java.io.Serializable;
 import java.time.LocalDateTime;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
@@ -87,7 +88,7 @@ CREATE TABLE `cr_report_email_sent_log` (
 @Getter
 @Setter
 @Entity
-public class CrReportEmailSentLog {
+public class CrReportEmailSentLog implements Serializable {
        @Id
        @Column(name = "log_id", nullable = false)
        @Digits(integer = 11, fraction = 0)
@@ -102,7 +103,7 @@ public class CrReportEmailSentLog {
        @SafeHtml
        @NotNull
        private String genKey;
-       @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+       @ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
        @JoinColumn(name = "rep_id", nullable = false)
        @NotNull
        @Valid