openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrba...@apache.org
Subject svn commit: r755469 - in /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence: AnnotationPersistenceMetaDataSerializer.java EntityManagerImpl.java
Date Wed, 18 Mar 2009 04:01:15 GMT
Author: jrbauer
Date: Wed Mar 18 04:01:14 2009
New Revision: 755469

URL: http://svn.apache.org/viewvc?rev=755469&view=rev
Log:
OPENJPA-885 Committing code and tests contributed by Dianne Richards.

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java?rev=755469&r1=755468&r2=755469&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java
Wed Mar 18 04:01:14 2009
@@ -1012,7 +1012,10 @@
         if (vmd.getCascadeRefresh() == ValueMetaData.CASCADE_IMMEDIATE) {
             cascades.add(CascadeType.REFRESH);
         }
-        if (cascades.size() == 4) // ALL
+        if (vmd.getCascadeDetach() == ValueMetaData.CASCADE_IMMEDIATE) {
+            cascades.add(CascadeType.CLEAR);
+        }
+        if (cascades.size() == 5) // ALL
         {
             cascades.clear();
             cascades.add(CascadeType.ALL);

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java?rev=755469&r1=755468&r2=755469&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
Wed Mar 18 04:01:14 2009
@@ -1475,6 +1475,7 @@
     }
 
     public void clear(Object entity) {
+        assertNotCloseInvoked();
         _broker.detach(entity, this);
     }
 



Mime
View raw message