openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r1060113 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/sqlcache/TestPreparedQueryCache.java
Date Mon, 17 Jan 2011 22:26:36 GMT
Author: ppoddar
Date: Mon Jan 17 22:26:36 2011
New Revision: 1060113

URL: http://svn.apache.org/viewvc?rev=1060113&view=rev
Log:
OPENJPA-1923: Remove restriction to enclose collection-valued query parameter in parentheses.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/sqlcache/TestPreparedQueryCache.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/sqlcache/TestPreparedQueryCache.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/sqlcache/TestPreparedQueryCache.java?rev=1060113&r1=1060112&r2=1060113&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/sqlcache/TestPreparedQueryCache.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/sqlcache/TestPreparedQueryCache.java
Mon Jan 17 22:26:36 2011
@@ -241,38 +241,6 @@ public class TestPreparedQueryCache exte
 		super.tearDown();
 	}
     
-    public void testCollectionValuedParams() {
-        OpenJPAEntityManager em = emf.createEntityManager();
-        String jpql = "select c.name from Department c where c.name in (:names) order by
c.name";
-        List<String> params = new ArrayList<String>();
-        for (int i = 0; i < DEPARTMENT_NAMES.length; i++)
-            params.add(DEPARTMENT_NAMES[i]);
-
-        List<String> rs = null;
-        List<String> rs2 = null;
-        try {
-            rs = (List<String>) em.createQuery(jpql).setParameter("names", params).getResultList();
-        } catch (Exception e) {
-            // as expected - syntax for collection valued parameter should be :names;
-        }
-        assertNull(rs);
-
-        try {
-            rs2 = (List<String>) em.createQuery(jpql).setParameter("names", params).getResultList();
-        } catch (Exception e) {
-            // as expected - syntax for collection valued parameter should be :names;
-        }
-        assertNull(rs2);
-
-        String jpql2 = "select c.name from Company c where c.name in :names order by c.name";
-        List<String> params2 = new ArrayList<String>();
-        for (int i = 0; i < COMPANY_NAMES.length; i++)
-            params2.add(COMPANY_NAMES[i]);
-        rs = (List<String>) em.createQuery(jpql2).setParameter("names", params2).getResultList();
-        rs2 = (List<String>) em.createQuery(jpql2).setParameter("names", params2).getResultList();
-        assertEquals(rs.size(), rs2.size());
-    }
-
     public void testCollectionValuedParameterOfEntities() {
         OpenJPAEntityManager em = emf.createEntityManager();
         String jpql1 = "select d from Department d where d.name in ('Marketing', 'Sales')
order by d.name";



Mime
View raw message