mirror of https://github.com/apache/openjpa.git
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:
parent
4b230ebb53
commit
bfa7d2c696
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue