X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=portal-BE%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportal%2Fdomain%2Fdb%2Fep%2FEpNotification.java;h=a10cc3e321b89e6fe279099ad3b17f2cb0d28be8;hb=ffd9af970318c1f5a0bad46d7aad5d4611414aae;hp=12c161f670699200523ddcfa6f412e0b84ce0641;hpb=682a90dad9795a3fa9aaffbf43c488057b8529e7;p=portal.git diff --git a/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpNotification.java b/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpNotification.java index 12c161f6..a10cc3e3 100644 --- a/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpNotification.java +++ b/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpNotification.java @@ -40,6 +40,7 @@ package org.onap.portal.domain.db.ep; +import java.io.Serializable; import java.time.LocalDateTime; import java.util.Set; import javax.persistence.CascadeType; @@ -50,6 +51,7 @@ import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; +import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.validation.constraints.Digits; import javax.validation.constraints.FutureOrPresent; @@ -88,9 +90,10 @@ CREATE TABLE `ep_notification` ( @Getter @Setter @Entity -public class EpNotification { +public class EpNotification implements Serializable { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + + @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "notification_ID", length = 11, nullable = false) @Digits(integer = 11, fraction = 0) private Long notificationID; @@ -144,14 +147,14 @@ public class EpNotification { @OneToMany( targetEntity = EpRoleNotification.class, mappedBy = "notificationID", - cascade = CascadeType.ALL, + cascade = CascadeType.MERGE, fetch = FetchType.LAZY ) private Set epRoleNotifications; @OneToMany( targetEntity = EpUserNotification.class, mappedBy = "notificationId", - cascade = CascadeType.ALL, + cascade = CascadeType.MERGE, fetch = FetchType.LAZY ) private Set epUserNotifications;