OPENJPA-1715: OpenJPA generates wrong SQL if a result variable that references an aggregate expression is used in ORDER BY clause

fix testcase.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.0.x@961472 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Catalina Wei 2010-07-07 18:37:29 +00:00
parent d7a9cdf3de
commit 5f2d51e23e
1 changed files with 5 additions and 1 deletions

View File

@ -82,7 +82,11 @@ public class TestJPQLScalarExpressions extends AbstractTestCase {
query.setFirstResult(1);
query.setMaxResults(4);
List<Object[]> rs = query.getResultList();
assertTrue((Long)((Object[]) rs.get(0))[1] > 0);
Object val = ((Object[]) rs.get(0))[1];
if (val instanceof Integer)
assertTrue((Integer) val > 0);
else if (val instanceof Long)
assertTrue((Long) val > 0);
}
}