mirror of https://github.com/apache/openjpa.git
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.
This commit is contained in:
parent
60cb785a3b
commit
1c30090c8c
|
@ -80,8 +80,6 @@ public class HSQLDictionary extends DBDictionary {
|
||||||
supportsSelectEndIndex = true;
|
supportsSelectEndIndex = true;
|
||||||
supportsDeferredConstraints = false;
|
supportsDeferredConstraints = false;
|
||||||
|
|
||||||
doubleTypeName = "NUMERIC";
|
|
||||||
|
|
||||||
supportsNullTableForGetPrimaryKeys = false;
|
supportsNullTableForGetPrimaryKeys = false;
|
||||||
supportsNullTableForGetIndexInfo = false;
|
supportsNullTableForGetIndexInfo = false;
|
||||||
|
|
||||||
|
|
|
@ -1114,17 +1114,17 @@ public class TestExplicitAccess extends SingleEMFTestCase {
|
||||||
assertTrue(ing2.containsKey("Peanut Butter"));
|
assertTrue(ing2.containsKey("Peanut Butter"));
|
||||||
Quantity q = ing2.get("Peanut Butter").getQuantity();
|
Quantity q = ing2.get("Peanut Butter").getQuantity();
|
||||||
assertNotNull(q);
|
assertNotNull(q);
|
||||||
assertEquals(1.0, q.getAmount());
|
assertEquals(1.0d, q.getAmount(), 0.001d);
|
||||||
assertEquals("Tbsp", q.getUnitOfMeasure());
|
assertEquals("Tbsp", q.getUnitOfMeasure());
|
||||||
assertTrue(ing2.containsKey("Jelly"));
|
assertTrue(ing2.containsKey("Jelly"));
|
||||||
q = ing2.get("Jelly").getQuantity();
|
q = ing2.get("Jelly").getQuantity();
|
||||||
assertNotNull(q);
|
assertNotNull(q);
|
||||||
assertEquals(1.5, q.getAmount());
|
assertEquals(1.5d, q.getAmount(), 0.001d);
|
||||||
assertEquals("Tbsp", q.getUnitOfMeasure());
|
assertEquals("Tbsp", q.getUnitOfMeasure());
|
||||||
assertTrue(ing2.containsKey("Bread"));
|
assertTrue(ing2.containsKey("Bread"));
|
||||||
q = ing2.get("Bread").getQuantity();
|
q = ing2.get("Bread").getQuantity();
|
||||||
assertNotNull(q);
|
assertNotNull(q);
|
||||||
assertEquals(2.0, q.getAmount());
|
assertEquals(2.0d, q.getAmount(), 0.001d);
|
||||||
assertEquals("Slice", q.getUnitOfMeasure());
|
assertEquals("Slice", q.getUnitOfMeasure());
|
||||||
|
|
||||||
em.remove(mi2);
|
em.remove(mi2);
|
||||||
|
|
|
@ -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
|
-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:
|
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:
|
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
|
-ea -Dopenjpa.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver -Dopenjpa.ConnectionURL=jdbc:sqlserver://localhost:1433;sendTimeAsDatetime=false -Dopenjpa.ConnectionUserName=SA -Dopenjpa.ConnectionPassword=OpenJP8tst
|
||||||
|
|
Loading…
Reference in New Issue