mirror of https://github.com/apache/openjpa.git
OPENJPA-2280: Reverting previous commits.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1404317 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bfa7d2c696
commit
2980c1901e
|
@ -29,10 +29,7 @@ public abstract class AbstractDB2Dictionary
|
|||
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 AbstractDB2Dictionary
|
|||
// 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,
|
||||
|
|
|
@ -34,7 +34,6 @@ import javax.persistence.criteria.CriteriaQuery;
|
|||
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 AbstractCriteriaTestCase extends TestCase {
|
|||
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) {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue