openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r893181 - in /openjpa/trunk: 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 Tue, 22 Dec 2009 14:27:20 GMT
Author: curtisr7
Date: Tue Dec 22 14:27:19 2009
New Revision: 893181

URL: http://svn.apache.org/viewvc?rev=893181&view=rev
Log:
OPENJPA-1441: Set pcVersionInit FieldMetaData to transient in PCEnhancer.

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/serializable/Person.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=893181&r1=893180&r2=893181&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
Tue Dec 22 14:27:19 2009
@@ -3702,6 +3702,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/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/serializable/Person.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/serializable/Person.java?rev=893181&r1=893180&r2=893181&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/serializable/Person.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/serializable/Person.java
Tue Dec 22 14:27:19 2009
@@ -24,6 +24,7 @@
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
 import javax.persistence.Table;
+import javax.persistence.Version;
 
 @Entity
 @Table(name="PERSON_SERIAL")
@@ -37,6 +38,8 @@
     
     private String lastName;
 
+    private int version;
+    
     @Id
     @GeneratedValue
     public int getId() {
@@ -62,6 +65,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