openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r1135857 - in /openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/spring/TestLibService.java
Date Tue, 14 Jun 2011 23:51:18 GMT
Author: ppoddar
Date: Tue Jun 14 23:51:18 2011
New Revision: 1135857

URL: http://svn.apache.org/viewvc?rev=1135857&view=rev
Log:
OPENJPA-2017: Introduce AutoDetach.NONE option to improve batch insert operation

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/spring/TestLibService.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=1135857&r1=1135856&r2=1135857&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
Tue Jun 14 23:51:18 2011
@@ -2896,7 +2896,7 @@ public class StateManagerImpl
      * <B>Note:</B> Proxying is bypassed if AutoDetach option is set to {@link
AutoDetach#DETACH_NONE}.
      */
     void proxyFields(boolean reset, boolean replaceNull) {
-    	if (getBroker().getAutoDetach() != AutoDetach.DETACH_NONE)
+    	if (getBroker().getAutoDetach() == AutoDetach.DETACH_NONE)
             return;
         // we only replace nulls if the runtime can't differentiate between
         // null and empty containers.  we replace nulls in this case to

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/spring/TestLibService.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/spring/TestLibService.java?rev=1135857&r1=1135856&r2=1135857&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/spring/TestLibService.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/spring/TestLibService.java
Tue Jun 14 23:51:18 2011
@@ -37,6 +37,7 @@ public class TestLibService extends Sing
     public EntityManager getTransactionalEntityManager() {
         // return a transactionally scoped entity manager
         OpenJPAEntityManager em = emf.createEntityManager();
+        txScope.remove(AutoDetachType.NONE);
         em.setAutoDetach(txScope);
         return em;
     }



Mime
View raw message