openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1404317 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/iden...
Date Wed, 31 Oct 2012 19:45:07 GMT
Author: curtisr7
Date: Wed Oct 31 19:45:06 2012
New Revision: 1404317

URL: http://svn.apache.org/viewvc?rev=1404317&view=rev
Log:
OPENJPA-2280: Reverting previous commits.

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/criteria/AbstractCriteriaTestCase.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=1404317&r1=1404316&r2=1404317&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
Wed Oct 31 19:45:06 2012
@@ -29,10 +29,7 @@ public abstract class AbstractDB2Diction
     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 @@ public abstract class AbstractDB2Diction
         // 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/criteria/AbstractCriteriaTestCase.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/AbstractCriteriaTestCase.java?rev=1404317&r1=1404316&r2=1404317&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/AbstractCriteriaTestCase.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/AbstractCriteriaTestCase.java
Wed Oct 31 19:45:06 2012
@@ -34,7 +34,6 @@ import javax.persistence.criteria.Criter
 import junit.framework.TestCase;
 
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
-import org.apache.openjpa.jdbc.sql.AbstractDB2Dictionary;
 import org.apache.openjpa.jdbc.sql.DBDictionary;
 import org.apache.openjpa.jdbc.sql.DerbyDictionary;
 import org.apache.openjpa.jdbc.sql.HSQLDictionary;
@@ -105,7 +104,7 @@ public abstract class AbstractCriteriaTe
     void setDictionary() {
         JDBCConfiguration conf = (JDBCConfiguration) getEntityManagerFactory().getConfiguration();
         dict = conf.getDBDictionaryInstance();
-        if (dict instanceof AbstractDB2Dictionary || dict instanceof HSQLDictionary) {
+        if (dict instanceof DerbyDictionary || dict instanceof HSQLDictionary) {
             dict.requiresCastForComparisons = false;
             dict.requiresCastForMathFunctions = false;
         } else if (dict instanceof OracleDictionary) {

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=1404317&r1=1404316&r2=1404317&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
Wed Oct 31 19:45:06 2012
@@ -59,6 +59,8 @@ public class TestSQLBigDecimalId
         
     }
     
+    @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);
@@ -75,7 +77,6 @@ public class TestSQLBigDecimalId
             (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