mirror of https://github.com/apache/openjpa.git
OPENJPA-1560 Committing JDBC escape sequence tests contributed by Dianne Richards.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@921550 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f69da24268
commit
6234dbddfc
|
@ -73,7 +73,19 @@ public class TestJDBCEscapeDate extends SingleEMFTestCase {
|
|||
List results = q.getResultList();
|
||||
Assert.assertEquals(1, results.size());
|
||||
}
|
||||
|
||||
// Test support in HAVING clause.
|
||||
String[] havingJpql = {
|
||||
"select a from Employee a group by a.hireTime having a.hireTime >= {t '00:00:00'}",
|
||||
"select a from Employee a group by a.hireDate having a.hireDate >= {d '2009-08-25'}",
|
||||
"select a from Employee a group by a.hireTimestamp having a.hireTimestamp >= {d '2009-08-25'}"
|
||||
};
|
||||
|
||||
for (int j = 0; j < havingJpql.length; j++) {
|
||||
Query q = em.createQuery(havingJpql[j]);
|
||||
List results = q.getResultList();
|
||||
Assert.assertEquals(1, results.size());
|
||||
}
|
||||
em.getTransaction().begin();
|
||||
String update = "update Employee a set a.hireTimestamp = {ts '2009-08-25 00:00:00.123456'} where a.empId = 1";
|
||||
Query q = em.createQuery(update);
|
||||
|
|
Loading…
Reference in New Issue