mirror of https://github.com/apache/openjpa.git
convert long->string in java - database might not support implicit conversion
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@997888 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0fd180d95a
commit
b877e90db8
|
@ -20,10 +20,15 @@ package org.apache.openjpa.persistence.jpql.expressions;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Query;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.Query;
|
||||
|
||||
import org.apache.openjpa.persistence.common.apps.*;
|
||||
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
|
||||
import org.apache.openjpa.persistence.OpenJPAEntityManager;
|
||||
import org.apache.openjpa.persistence.common.apps.Address;
|
||||
import org.apache.openjpa.persistence.common.apps.CompUser;
|
||||
import org.apache.openjpa.persistence.common.apps.FemaleUser;
|
||||
import org.apache.openjpa.persistence.common.apps.MaleUser;
|
||||
import org.apache.openjpa.persistence.common.utils.AbstractTestCase;
|
||||
|
||||
public class TestJPQLScalarExpressions extends AbstractTestCase {
|
||||
|
@ -189,7 +194,12 @@ public class TestJPQLScalarExpressions extends AbstractTestCase {
|
|||
List rs3 = em.createQuery(query3).getResultList();
|
||||
Object[] result3 = (Object[]) rs3.get(0);
|
||||
assertEquals("the result is not female", "Female", result3[1]);
|
||||
assertEquals("the name is not shannon", "Shannon ", result3[0]);
|
||||
if (((JDBCConfiguration) ((OpenJPAEntityManager) em).getConfiguration()).
|
||||
getDBDictionaryInstance().trimsTrailingWhitespace) {
|
||||
assertEquals("the name is not shannon", "Shannon", result3[0]);
|
||||
} else {
|
||||
assertEquals("the name is not shannon", "Shannon ", result3[0]);
|
||||
}
|
||||
result3 = (Object[]) rs3.get(2);
|
||||
assertEquals("the result is not male", "Male", result3[1]);
|
||||
assertEquals("the name is not seetha", "Seetha", result3[0]);
|
||||
|
|
Loading…
Reference in New Issue