openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r893220 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractDB2Dictionary.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java
Date Tue, 22 Dec 2009 16:28:09 GMT
Author: curtisr7
Date: Tue Dec 22 16:28:09 2009
New Revision: 893220

URL: http://svn.apache.org/viewvc?rev=893220&view=rev
Log:
OPENJPA-1224: Backing out DB2 and Derby related changes to investigate in a seperate JIRA.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractDB2Dictionary.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractDB2Dictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractDB2Dictionary.java?rev=893220&r1=893219&r2=893220&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractDB2Dictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractDB2Dictionary.java
Tue Dec 22 16:28:09 2009
@@ -29,10 +29,7 @@
     public int varcharCastLength = 1000;
 
     public AbstractDB2Dictionary() {
-    	// http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.java.doc
-    	//	/doc/rjvjdata.htm
-		// http://db.apache.org/derby/docs/10.3/ref/rrefsqlj12362.html
-    	numericTypeName = "DECIMAL";
+        numericTypeName = "DOUBLE";
         bitTypeName = "SMALLINT";
         smallintTypeName = "SMALLINT";
         tinyintTypeName = "SMALLINT";
@@ -72,9 +69,6 @@
         // the equivalent "X JOIN Y ON 1 = 1"
         crossJoinClause = "JOIN";
         requiresConditionForCrossJoin = true;
-        
-        // DB2 / Derby allows precision to be set on a DECIMAL column.
-        fixedSizeTypeNameSet.remove("DECIMAL");
     }
 
     public void indexOf(SQLBuffer buf, FilterValue str, FilterValue find,

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java?rev=893220&r1=893219&r2=893220&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java
Tue Dec 22 16:28:09 2009
@@ -24,6 +24,10 @@
 
 import junit.textui.TestRunner;
 
+import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
+import org.apache.openjpa.jdbc.sql.DBDictionary;
+import org.apache.openjpa.jdbc.sql.MySQLDictionary;
+import org.apache.openjpa.persistence.test.AllowFailure;
 import org.apache.openjpa.persistence.test.SingleEMFTestCase;
 
 /**
@@ -58,6 +62,8 @@
         
     }
     
+    @AllowFailure
+    // This test currently allows failure because DB2 and Derby don't handle BigDecimals
properly quite yet. 
     public void testQuery() {
         int data = 156;
         BigDecimal decimal = new BigDecimal(1234);
@@ -74,7 +80,6 @@
             (SQLBigDecimalIdEntity) em.createQuery("SELECT a FROM SQLBigDecimalIdEntity a
WHERE a.data=" + data)
                 .getSingleResult();
         
-        // This would fail prior to OPENJPA-1224.
         assertEquals(e, e2);
         em.close();
 



Mime
View raw message