mirror of https://github.com/apache/openjpa.git
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:
parent
d7a9cdf3de
commit
5f2d51e23e
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue