openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r905808 - in /openjpa/branches/1.2.x: openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java
Date Tue, 02 Feb 2010 21:56:11 GMT
Author: mikedd
Date: Tue Feb  2 21:56:10 2010
New Revision: 905808

URL: http://svn.apache.org/viewvc?rev=905808&view=rev
Log:
OPENJPA-1482:
Prevent NoSuchMethodError when calling setVersion. 
Submitted By : Rick Curtis

Modified:
    openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java

Modified: openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=905808&r1=905807&r2=905808&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
(original)
+++ openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
Tue Feb  2 21:56:10 2010
@@ -3661,7 +3661,8 @@
             v.setTransient(true);
             loadManagedInstance(code, true);
             code.constant().setValue(1);
-            addSetManagedValueCode(code, v);   
+            // pcVersionInit = true;
+            putfield(code, null, v.getName(), v.getDeclaredType());   
         }
         code.vreturn();
 

Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java?rev=905808&r1=905807&r2=905808&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java
(original)
+++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java
Tue Feb  2 21:56:10 2010
@@ -75,6 +75,14 @@
 
     }
 
+    /**
+     * This testcase was added for OPENJPA-1482.
+     */
+    public void testSetVersionPropertyAccess() {
+        NoDetachedStateEntityPropertyAccess entity = new NoDetachedStateEntityPropertyAccess();
+        entity.setVersion(1);
+    }
+    
     void loadDB() {
         OpenJPAEntityManagerSPI em = emf.createEntityManager();
         em.getTransaction().begin();



Mime
View raw message