diff options
author | 2019-12-04 15:49:03 +0100 | |
---|---|---|
committer | 2019-12-04 15:49:43 +0100 | |
commit | ffd9af970318c1f5a0bad46d7aad5d4611414aae (patch) | |
tree | 935f5e0a13a21df52ca1d796ac3b684910d4ba4c /portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpRoleNotification.java | |
parent | 39fb119cdaea6bd8d801b22d195db39f6d8faaca (diff) |
Domain model change
ORM inheritance implementation in all classes that extend from DomainVo
class.
This patch also change data source from data.sql to DBInitializingBean that
pushing data by hibernate to database.
Issue-ID: PORTAL-710
Change-Id: I0f95f7a50facae9f3004ff9f16cdee4e76a39e35
Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Diffstat (limited to 'portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpRoleNotification.java')
-rw-r--r-- | portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpRoleNotification.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpRoleNotification.java b/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpRoleNotification.java index 94df52d5..53e48073 100644 --- a/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpRoleNotification.java +++ b/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpRoleNotification.java @@ -51,6 +51,7 @@ import javax.persistence.Id; import javax.persistence.Index; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; +import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.validation.Valid; import javax.validation.constraints.Digits; @@ -87,16 +88,17 @@ CREATE TABLE `ep_role_notification` ( @Entity public class EpRoleNotification implements Serializable { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + + @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "ID", length = 11, nullable = false, columnDefinition = "int(11) AUTO_INCREMENT") @Digits(integer = 11, fraction = 0) private Long id; - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.MERGE) @JoinColumn(name = "notification_ID") @Valid private EpNotification notificationID; - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) - @JoinColumn(name = "role_ID") + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.MERGE) + @JoinColumn(name = "role_ID", columnDefinition = "bigint") @Valid private FnRole roleID; @Column(name = "recv_user_id", length = 11, columnDefinition = "int(11) DEFAULT NULL") |