You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2022/03/07 14:51:10 UTC

[logging-log4j2] branch release-2.x updated: Update test fixture for JPA and H2 to follow the only IDENTUTY syntax that will be allowed in H2 2.x. Actually updating to H2 2.x fails and might require an update the Eclipse JPA provider.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/release-2.x by this push:
     new 2e49ade  Update test fixture for JPA and H2 to follow the only IDENTUTY syntax that will be allowed in H2 2.x. Actually updating to H2 2.x fails and might require an update the Eclipse JPA provider.
2e49ade is described below

commit 2e49ade61839d01ab5a189ac23cdc643e20a4522
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Mar 7 09:51:06 2022 -0500

    Update test fixture for JPA and H2 to follow the only IDENTUTY syntax
    that will be allowed in H2 2.x. Actually updating to H2 2.x fails and
    might require an update the Eclipse JPA provider.
---
 .../apache/logging/log4j/core/appender/db/jpa/JpaH2AppenderTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/log4j-jpa/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaH2AppenderTest.java b/log4j-jpa/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaH2AppenderTest.java
index daf4983..d092526 100644
--- a/log4j-jpa/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaH2AppenderTest.java
+++ b/log4j-jpa/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaH2AppenderTest.java
@@ -39,13 +39,13 @@ public class JpaH2AppenderTest extends AbstractJpaAppenderTest {
 
         try (Statement statement = connection.createStatement()) {
             statement.executeUpdate("CREATE TABLE jpaBaseLogEntry ( "
-                    + "id INTEGER IDENTITY, eventDate DATETIME, instant NVARCHAR(64), level NVARCHAR(10), "
+                    + "id INTEGER GENERATED ALWAYS AS IDENTITY, eventDate DATETIME, instant NVARCHAR(64), level NVARCHAR(10), "
                     + "logger NVARCHAR(255), message NVARCHAR(1024), exception NVARCHAR(1048576) )");
         }
 
         try (Statement statement = connection.createStatement()) {
             statement.executeUpdate("CREATE TABLE jpaBasicLogEntry ( "
-                    + "id INTEGER IDENTITY, timemillis BIGINT, instant NVARCHAR(64), nanoTime BIGINT, "
+                    + "id INTEGER GENERATED ALWAYS AS IDENTITY, timemillis BIGINT, instant NVARCHAR(64), nanoTime BIGINT, "
                     + "level NVARCHAR(10), loggerName NVARCHAR(255), message NVARCHAR(1024), "
                     + "thrown NVARCHAR(1048576), contextMapJson NVARCHAR(1048576), loggerFQCN NVARCHAR(1024), "
                     + "contextStack NVARCHAR(1048576), marker NVARCHAR(255), source NVARCHAR(2048),"