openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r655842 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestM2MInDataCache.java
Date Tue, 13 May 2008 12:52:57 GMT
Author: mikedd
Date: Tue May 13 05:52:57 2008
New Revision: 655842

URL: http://svn.apache.org/viewvc?rev=655842&view=rev
Log:
OPENJPA-589 updating testcase with Fay's changes.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestM2MInDataCache.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestM2MInDataCache.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestM2MInDataCache.java?rev=655842&r1=655841&r2=655842&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestM2MInDataCache.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestM2MInDataCache.java
Tue May 13 05:52:57 2008
@@ -18,6 +18,8 @@
  */
 package org.apache.openjpa.persistence.datacache;
 
+import java.util.Map;
+
 import javax.persistence.EntityManager;
 import org.apache.openjpa.persistence.datacache.common.apps.M2MEntityE;
 import org.apache.openjpa.persistence.datacache.common.apps.M2MEntityF;
@@ -64,17 +66,21 @@
         f1.getEntityE().put(e2.getName(), e2);
         f2.getEntityE().put(e1.getName(), e1);
         f2.getEntityE().put(e2.getName(), e2);
-        e1.print();
-        e2.print();
-        f1.print();
-        f2.print();
         em.getTransaction().commit();
         em.close();
 
         em = emf.createEntityManager();
-        M2MEntityE e1a = em.find(M2MEntityE.class, 1);
-        M2MEntityE e2a = em.find(M2MEntityE.class, 2);
-        M2MEntityF f1a = em.find(M2MEntityF.class, 10);
-        M2MEntityF f2a = em.find(M2MEntityF.class, 20);
+        try {
+            M2MEntityE e1a = em.find(M2MEntityE.class, 1);
+            Map entityf1 = e1a.getEntityF();
+            M2MEntityE e2a = em.find(M2MEntityE.class, 2);
+            Map entityf2 = e2a.getEntityF();
+            M2MEntityF f1a = em.find(M2MEntityF.class, 10);
+            Map entitye1 = f1a.getEntityE();
+            M2MEntityF f2a = em.find(M2MEntityF.class, 20);
+            Map entitye2 = f2a.getEntityE();
+        } catch (Exception e) {
+            fail("Fail to get a Map field when DataCache is on");
+        }
     }
 }



Mime
View raw message