diff options
author | Dominik Mizyn <d.mizyn@samsung.com> | 2019-12-04 15:49:03 +0100 |
---|---|---|
committer | Dominik Mizyn <d.mizyn@samsung.com> | 2019-12-04 15:49:43 +0100 |
commit | ffd9af970318c1f5a0bad46d7aad5d4611414aae (patch) | |
tree | 935f5e0a13a21df52ca1d796ac3b684910d4ba4c /ecomp-portal-BE-common/src | |
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 'ecomp-portal-BE-common/src')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/SharedContext.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/SharedContext.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/SharedContext.java index 14837dbf..729540cf 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/SharedContext.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/SharedContext.java @@ -43,6 +43,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.validation.constraints.Digits; @@ -69,7 +70,8 @@ public class SharedContext extends DomainVo { private static final long serialVersionUID = 7287469622586677888L; @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @SequenceGenerator(name="portal_generator", sequenceName = "portal_generator", initialValue = 1000) + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "portal_generator") @Digits(integer = 11, fraction = 0) private Long id; |