OPENJPA-2280: Update testcase so it works on DB2.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1403472 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Richard G. Curtis 2012-10-29 19:59:19 +00:00
parent 4b230ebb53
commit bfa7d2c696
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@ 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;
@ -104,7 +105,7 @@ public abstract class AbstractCriteriaTestCase extends TestCase {
void setDictionary() {
JDBCConfiguration conf = (JDBCConfiguration) getEntityManagerFactory().getConfiguration();
dict = conf.getDBDictionaryInstance();
if (dict instanceof DerbyDictionary || dict instanceof HSQLDictionary) {
if (dict instanceof AbstractDB2Dictionary || dict instanceof HSQLDictionary) {
dict.requiresCastForComparisons = false;
dict.requiresCastForMathFunctions = false;
} else if (dict instanceof OracleDictionary) {