From 8cf623781404f98aeacfc44e1bc8a7f1bf8446ad Mon Sep 17 00:00:00 2001 From: liamfallon Date: Sun, 18 Dec 2022 02:26:01 +0000 Subject: Upgrade the H2 database to the latest version The latest verison of H2 does not allow colums called "user" or indexes using an underscore in their name. Issue-ID: POLICY-4488 Change-Id: I1db62768b0c0f85543c2f7d3681243f8386825e7 Signed-off-by: liamfallon --- .../pap/persistence/concepts/JpaPolicyAudit.java | 19 ++++++++++--------- .../pap/persistence/concepts/JpaPolicyAuditTest.java | 2 +- .../src/test/resources/META-INF/persistence.xml | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) (limited to 'models-pap/src') diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java b/models-pap/src/main/java/org/onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java index 35e385637..e2f8972de 100644 --- a/models-pap/src/main/java/org/onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java +++ b/models-pap/src/main/java/org/onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java @@ -63,7 +63,9 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; * */ @Entity -@Table(name = "JpaPolicyAudit", indexes = {@Index(name = "JpaPolicyAuditIndex_timestamp", columnList = "timeStamp")}) +@Table(name = "JpaPolicyAudit", indexes = { + @Index(name = "JpaPolicyAuditIndex_timestamp", columnList = "timeStamp") +}) @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) @Data @EqualsAndHashCode(callSuper = false) @@ -105,7 +107,7 @@ public class JpaPolicyAudit extends PfConcept implements PfAuthorative getKeys() { final List keyList = new ArrayList<>(); @@ -221,7 +222,7 @@ public class JpaPolicyAudit extends PfConcept implements PfAuthorative jpaAudit.clean()); - assertEquals(USER, jpaAudit.getUser()); + assertEquals(USER, jpaAudit.getUserName()); } @Test diff --git a/models-pap/src/test/resources/META-INF/persistence.xml b/models-pap/src/test/resources/META-INF/persistence.xml index 58e2deca3..fcab08f3e 100644 --- a/models-pap/src/test/resources/META-INF/persistence.xml +++ b/models-pap/src/test/resources/META-INF/persistence.xml @@ -31,7 +31,7 @@ - + -- cgit 1.2.3-korg