openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r897009 - 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/inheritance/serializable/Person.java
Date Thu, 07 Jan 2010 20:41:15 GMT
Author: mikedd
Date: Thu Jan  7 20:40:56 2010
New Revision: 897009

URL: http://svn.apache.org/viewvc?rev=897009&view=rev
Log:
OPENJPA-1441: 
Set pcVersionInit FieldMetaData to transient in PCEnhancer - merged to 1.2.x.
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/inheritance/serializable/Person.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=897009&r1=897008&r2=897009&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
Thu Jan  7 20:40:56 2010
@@ -3658,6 +3658,7 @@
         if(fmd.isVersion()==true && _addVersionInitFlag){
             // if we are setting the version, flip the versionInit flag to true
             FieldMetaData v = _meta.addDeclaredField(VERSION_INIT_STR, boolean.class);
+            v.setTransient(true);
             loadManagedInstance(code, true);
             code.constant().setValue(1);
             addSetManagedValueCode(code, v);   

Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/serializable/Person.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/serializable/Person.java?rev=897009&r1=897008&r2=897009&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/serializable/Person.java
(original)
+++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/serializable/Person.java
Thu Jan  7 20:40:56 2010
@@ -23,6 +23,7 @@
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
+import javax.persistence.Version;
 
 @Entity
 public class Person implements Serializable {
@@ -35,6 +36,8 @@
     
     private String lastName;
 
+    private int version;
+    
     @Id
     @GeneratedValue
     public int getId() {
@@ -60,6 +63,14 @@
     public void setLastName(String lastName) {
         this.lastName = lastName;
     }
+    
+    @Version
+    public int getVersion(){
+        return version;
+    }
+    public void setVersion(int v){
+        version = v;
+    }
 
     @Override
     public int hashCode() {



Mime
View raw message