openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrba...@apache.org
Subject svn commit: r924391 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_26_ex0/TestSpec10_1_26.java
Date Wed, 17 Mar 2010 17:57:18 GMT
Author: jrbauer
Date: Wed Mar 17 17:57:18 2010
New Revision: 924391

URL: http://svn.apache.org/viewvc?rev=924391&view=rev
Log:
OPENJPA-1579 Committing test code for Dianne Richards.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_26_ex0/TestSpec10_1_26.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_26_ex0/TestSpec10_1_26.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_26_ex0/TestSpec10_1_26.java?rev=924391&r1=924390&r2=924391&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_26_ex0/TestSpec10_1_26.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_26_ex0/TestSpec10_1_26.java
Wed Mar 17 17:57:18 2010
@@ -151,6 +151,19 @@ public class TestSpec10_1_26 extends SQL
             setCandidate(q, Department3.class);
         rs = q.getResultList();
         EmployeeName3 d3 = (EmployeeName3) rs.get(0);
+        
+        // Check HAVING clause support for KEY
+        query = "select KEY(e) from Department1 d, " +
+        " in (d.empMap) e " +
+        "group by KEY(e) " +
+        "having KEY(e) = 2";
+        q = em.createQuery(query);
+        if (inMemory) 
+            setCandidate(q, Department1.class);
+        rs = q.getResultList();
+        Integer deptId = (Integer) rs.get(0);
+        assertEquals("dept id is not 2", 2, deptId.intValue());
+        
         em.close();
     }
 



Mime
View raw message