[openjpa] branch master updated (be62c5a -> ad4ed02)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[openjpa] branch master updated (be62c5a -> ad4ed02)

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

struberg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git.


    from be62c5a  OPENJPA-2713 add LocalDate support for Oracle DB
     new e82d1ec  OPENJPA-2713 remove left over in PostgresDictionary
     new ad4ed02  OPENJPA-2713 fix h2

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/openjpa/jdbc/sql/DBDictionary.java  |  3 +++
 .../org/apache/openjpa/jdbc/sql/H2Dictionary.java  |  3 +++
 .../openjpa/jdbc/sql/PostgresDictionary.java       |  6 -----
 openjpa-project/BUILDING.txt                       |  6 ++---
 pom.xml                                            | 27 ++++++++++++++++++++++
 5 files changed, 36 insertions(+), 9 deletions(-)

Reply | Threaded
Open this post in threaded view
|

[openjpa] 01/02: OPENJPA-2713 remove left over in PostgresDictionary

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

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git

commit e82d1ec2fb058809306875c1d3f957caf4b283cf
Author: Mark Struberg <[hidden email]>
AuthorDate: Tue Jan 29 22:22:15 2019 +0100

    OPENJPA-2713 remove left over in PostgresDictionary
---
 .../main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java   | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
index e64d1de..935a924 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
@@ -125,12 +125,6 @@ public class PostgresDictionary extends DBDictionary {
     public String isOwnedSequenceSQL = "SELECT pg_get_serial_sequence(?, ?)";
 
 
-    /**
-     * Since PostgreSQL
-     */
-    private boolean supportsTimezone;
-
-
     public PostgresDictionary() {
         platform = "PostgreSQL";
         validationSQL = "SELECT NOW()";

Reply | Threaded
Open this post in threaded view
|

[openjpa] 02/02: OPENJPA-2713 fix h2

struberg
In reply to this post by struberg
This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git

commit ad4ed02728a9bbb1624f490bf6eabd59922981a9
Author: Mark Struberg <[hidden email]>
AuthorDate: Wed Jan 30 22:33:08 2019 +0100

    OPENJPA-2713 fix h2
---
 .../org/apache/openjpa/jdbc/sql/DBDictionary.java  |  3 +++
 .../org/apache/openjpa/jdbc/sql/H2Dictionary.java  |  3 +++
 openjpa-project/BUILDING.txt                       |  6 ++---
 pom.xml                                            | 27 ++++++++++++++++++++++
 4 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
index f9bc575..a0ad2ba 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
@@ -4755,6 +4755,9 @@ public class DBDictionary
      * from {@link DatabaseMetaData}.
      */
     protected String getTableNameForMetadata(DBIdentifier tableName) {
+        if (tableName == null) {
+            return null;
+        }
         return convertSchemaCase(tableName.getUnqualifiedName());
     }
 
diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java
index af1871e..a6f1e79 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java
@@ -69,6 +69,9 @@ public class H2Dictionary extends DBDictionary {
         supportsLockingWithOuterJoin = false;
         supportsLockingWithInnerJoin = false;
 
+        // no timezone support for time in h2
+        timeWithZoneTypeName = "TIME";
+
         reservedWordSet.addAll(Arrays.asList(new String[] {
             "CURRENT_TIMESTAMP", "CURRENT_TIME", "CURRENT_DATE", "CROSS",
             "DISTINCT", "EXCEPT", "EXISTS", "FROM", "FOR", "FALSE", "FULL",
diff --git a/openjpa-project/BUILDING.txt b/openjpa-project/BUILDING.txt
index 351d380..c973078 100644
--- a/openjpa-project/BUILDING.txt
+++ b/openjpa-project/BUILDING.txt
@@ -198,17 +198,17 @@ To run the tests in the debugger simply add the following JVM properties
  -Dopenjpa.ConnectionURL=jdbc:derby:target/database/openjpa-derby-database;create=true -Dopenjpa.ConnectionDriverName=org.apache.derby.jdbc.EmbeddedDriver
 
 For running against a MySQL Docker installation:
-
  -ea -Dopenjpa.ConnectionDriverName=com.mysql.jdbc.Driver -Dopenjpa.ConnectionURL=jdbc:mysql://localhost:3306/openjpatst -Dopenjpa.ConnectionUserName=openjpatst -Dopenjpa.ConnectionPassword=openjpatst
 
 Running against a PostgreSQL Docker installation:
-
  -ea -Dopenjpa.ConnectionDriverName=org.postgresql.Driver -Dopenjpa.ConnectionURL=jdbc:postgresql:5432//localhost/openjpatst -Dopenjpa.ConnectionUserName=postgres -Dopenjpa.ConnectionPassword=postgres
 
 For running against a MariaDB Docker installation:
-
  -ea -Dopenjpa.ConnectionDriverName=org.mariadb.jdbc.Driver -Dopenjpa.ConnectionURL=jdbc:mariadb://localhost:3306/openjpatst -Dopenjpa.ConnectionUserName=root -Dopenjpa.ConnectionPassword=openjpatst
 
+For running against a h2 based installation:
+ -ea -Dopenjpa.ConnectionDriverName=org.h2.Driver -Dopenjpa.ConnectionURL=jdbc:h2:./target/database/openjpa-h2-database -Dopenjpa.ConnectionUserName=root -Dopenjpa.ConnectionPassword=openjpatst
+
 TODO: finish!
 
 For starting tests in `openjpa-persistence-jdbc` inside a compiler you can also trigger all the enhancement manually via:
diff --git a/pom.xml b/pom.xml
index 7a44eba..45bb243 100644
--- a/pom.xml
+++ b/pom.xml
@@ -430,6 +430,33 @@
             </properties>
         </profile>
 
+        <!-- profile for testing with an embedded h2 DB -->
+        <profile>
+            <id>test-h2</id>
+            <activation>
+                <property>
+                    <name>test-h2</name>
+                </property>
+            </activation>
+            <properties>
+                <h2.version>1.4.197</h2.version>
+                <connection.driver.name>org.h2.Driver</connection.driver.name>
+                <connection.url>jdbc:h2:./target/database/openjpa-h2-database</connection.url>
+                <connection.username />
+                <connection.password />
+                <!-- TCK specific properties -->
+                <tck.db.name>h2mem</tck.db.name>
+            </properties>
+
+            <dependencies>
+                <dependency>
+                    <groupId>com.h2database</groupId>
+                    <artifactId>h2</artifactId>
+                    <version>${h2.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+
         <!-- Profile for testing with an In-Memory Apache Derby DB -->
         <profile>
             <!--