openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hthom...@apache.org
Subject svn commit: r1673276 - in /openjpa/trunk: ./ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java
Date Mon, 13 Apr 2015 20:32:10 GMT
Author: hthomann
Date: Mon Apr 13 20:32:10 2015
New Revision: 1673276

URL: http://svn.apache.org/r1673276
Log:
OPENJPA-1988: Made an update to the test case for this JIRA, i.e. merged r1641906 from 2.2.x
to trunk.

Modified:
    openjpa/trunk/   (props changed)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java

Propchange: openjpa/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Apr 13 20:32:10 2015
@@ -2,5 +2,5 @@
 /openjpa/branches/2.0.x:1504611
 /openjpa/branches/2.1.x:1415379,1415398,1485010,1513249,1517838,1530146,1533218,1533280,1539188,1569528,1575444,1591536,1636464,1655218,1662610
 /openjpa/branches/2.2.1.x:1415367,1415413,1415425,1504719,1508186,1530347,1533222,1539193,1651808
-/openjpa/branches/2.2.x:1384400,1415459-1415460,1415469,1485013,1530364,1533223,1580898,1580939,1591681,1631786,1666312
+/openjpa/branches/2.2.x:1384400,1415459-1415460,1415469,1485013,1530364,1533223,1580898,1580939,1591681,1631786,1641906,1666312
 /openjpa/branches/2.3.x:1533462,1535560,1536912,1540277,1564121

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java?rev=1673276&r1=1673275&r2=1673276&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java
Mon Apr 13 20:32:10 2015
@@ -31,6 +31,26 @@ public class TestPUDefaultCascadePersist
         emf = OpenJPAPersistence.
                 createEntityManagerFactory("TestPUDefaultCascadePersist", 
                     "org/apache/openjpa/persistence/cascade/pudefault/META-INF/persistence.xml");
+        
+        EntityManager em = emf.createEntityManager();
+        try {
+            em.getTransaction().begin();
+            em.createQuery("DELETE FROM PUDEntityA01").executeUpdate();
+            em.createQuery("DELETE FROM PUDEntityA02").executeUpdate();
+            em.createQuery("DELETE FROM PUDEntityAE01").executeUpdate();
+            em.createQuery("DELETE FROM PUDEntityB").executeUpdate();
+            em.createQuery("DELETE FROM PUDEntityA01_PUDEntityB").executeUpdate();
+            em.createQuery("DELETE FROM PUDEntityA02_PUDEntityB").executeUpdate();
+            em.createQuery("DELETE FROM PUDEntityAE01_PUDEntityB").executeUpdate();
+            em.getTransaction().commit();
+        } catch (Throwable t) {
+            // Swallow
+        } finally {
+            if (em.getTransaction().isActive()) {
+                em.getTransaction().rollback();
+            }
+            em.close();
+        }
 //        super.setUp(PUDEntityA01.class, PUDEntityB.class,
 //            "org/apache/openjpa/persistence/cascade/pudefault/META-INF/cascadepersistorm.xml",
 //            CLEAR_TABLES);



Mime
View raw message