openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fayw...@apache.org
Subject svn commit: r761328 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
Date Thu, 02 Apr 2009 15:40:13 GMT
Author: faywang
Date: Thu Apr  2 15:40:13 2009
New Revision: 761328

URL: http://svn.apache.org/viewvc?rev=761328&view=rev
Log:
OPENJPA-218: fix merge problem with derived identity using IdClass. The corresponding test
case is checked in using JIRA-1004.

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.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=761328&r1=761327&r2=761328&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
Thu Apr  2 15:40:13 2009
@@ -2270,8 +2270,13 @@
             type = fmds[i].getObjectIdFieldType();
             if (!fieldManager 
                 && fmds[i].getDeclaredTypeCode() == JavaTypes.PC) {
-                // sm.getPCPrimaryKey(oid, i + pcInheritedFieldCount); 
+                // if (sm == null) return;
                 loadManagedInstance(code, false);
+                code.getfield().setField(SM, SMTYPE);
+                JumpInstruction ifins = code.ifnonnull();
+                code.vreturn();
+                // sm.getPCPrimaryKey(oid, i + pcInheritedFieldCount); 
+                ifins.setTarget(loadManagedInstance(code, false));
                 code.dup(); // leave orig on stack to set value into
                 code.getfield().setField(SM, SMTYPE);
                 code.aload().setLocal(id);



Mime
View raw message