openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r727747 - in /openjpa/branches/1.3.x: ./ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/
Date Thu, 18 Dec 2008 15:28:01 GMT
Author: mikedd
Date: Thu Dec 18 07:28:01 2008
New Revision: 727747

URL: http://svn.apache.org/viewvc?rev=727747&view=rev
Log:
merge OPENJPA-777 to 1.3.x

Added:
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EmbedB.java
      - copied unchanged from r727744, openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EmbedB.java
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EntityA.java
      - copied unchanged from r727744, openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EntityA.java
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EntityA1.java
      - copied unchanged from r727744, openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EntityA1.java
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EntityB.java
      - copied unchanged from r727744, openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EntityB.java
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EntityC.java
      - copied unchanged from r727744, openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/PColl_EntityC.java
    openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/TestPersistentCollection.java
      - copied unchanged from r727744, openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/TestPersistentCollection.java
Modified:
    openjpa/branches/1.3.x/   (props changed)
    openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java

Propchange: openjpa/branches/1.3.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 18 07:28:01 2008
@@ -1 +1,2 @@
+/openjpa/branches/1.2.x:727744
 /openjpa/trunk:712928,719698,720521,720529,724765

Modified: openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java?rev=727747&r1=727746&r2=727747&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java
(original)
+++ openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java
Thu Dec 18 07:28:01 2008
@@ -967,7 +967,13 @@
 
         if (oid == null)
             sm.storeObject(field.getIndex(), null);
-        else
-            sm.setIntermediate(field.getIndex(), oid);
+        else {
+            if (JavaTypes.maybePC(field.getValue()) &&
+                !field.getValue().getDeclaredTypeMetaData().isEmbeddedOnly()) {
+                Object obj = store.find(oid, field, fetch);
+                sm.storeObject(field.getIndex(), obj);
+            } else    
+                sm.setIntermediate(field.getIndex(), oid);
+        }
     }
 }



Mime
View raw message