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 1c30090c8c611843860ff83be862e22cbcf46cee Author: Mark Struberg <strub...@apache.org> AuthorDate: Sun Apr 4 13:51:21 2021 +0200 OPENJPA-2859 use DOUBLE instead of NUMERIC by default NUMERIC has no fraction digits, so rather use DOUBLE data type which is a 64bit double value. --- .../src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java | 2 -- .../org/apache/openjpa/persistence/access/TestExplicitAccess.java | 6 +++--- openjpa-project/BUILDING.txt | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java index 8c4f23c..35d6010 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java @@ -80,8 +80,6 @@ public class HSQLDictionary extends DBDictionary { supportsSelectEndIndex = true; supportsDeferredConstraints = false; - doubleTypeName = "NUMERIC"; - supportsNullTableForGetPrimaryKeys = false; supportsNullTableForGetIndexInfo = false; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java index 7d186732..d019f74 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java @@ -1114,17 +1114,17 @@ public class TestExplicitAccess extends SingleEMFTestCase { assertTrue(ing2.containsKey("Peanut Butter")); Quantity q = ing2.get("Peanut Butter").getQuantity(); assertNotNull(q); - assertEquals(1.0, q.getAmount()); + assertEquals(1.0d, q.getAmount(), 0.001d); assertEquals("Tbsp", q.getUnitOfMeasure()); assertTrue(ing2.containsKey("Jelly")); q = ing2.get("Jelly").getQuantity(); assertNotNull(q); - assertEquals(1.5, q.getAmount()); + assertEquals(1.5d, q.getAmount(), 0.001d); assertEquals("Tbsp", q.getUnitOfMeasure()); assertTrue(ing2.containsKey("Bread")); q = ing2.get("Bread").getQuantity(); assertNotNull(q); - assertEquals(2.0, q.getAmount()); + assertEquals(2.0d, q.getAmount(), 0.001d); assertEquals("Slice", q.getUnitOfMeasure()); em.remove(mi2); diff --git a/openjpa-project/BUILDING.txt b/openjpa-project/BUILDING.txt index 8144675..e2bbd6a 100644 --- a/openjpa-project/BUILDING.txt +++ b/openjpa-project/BUILDING.txt @@ -210,7 +210,7 @@ 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 For running against a hsqldb based installation: - -ea -Dopenjpa.ConnectionDriverName=org.hsqldb.Driver -Dopenjpa.ConnectionURL=jdbc:hsqldb:mem:openjpa20-hsqldb-database -Dopenjpa.ConnectionUserName=sa -Dopenjpa.ConnectionPassword= + -ea -Dopenjpa.ConnectionDriverName=org.hsqldb.jdbcDriver -Dopenjpa.ConnectionURL=jdbc:hsqldb:mem:openjpa20-hsqldb-database -Dopenjpa.ConnectionUserName=sa -Dopenjpa.ConnectionPassword= For running tests against a Microsoft SQLServer Docker based installation: -ea -Dopenjpa.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver -Dopenjpa.ConnectionURL=jdbc:sqlserver://localhost:1433;sendTimeAsDatetime=false -Dopenjpa.ConnectionUserName=SA -Dopenjpa.ConnectionPassword=OpenJP8tst