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/trunk@961472 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ee83defe59
commit
90a54ac7e7
|
@ -83,7 +83,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