OPENJPA-218: fix merge problem with derived identity using IdClass. The corresponding test case is checked in using JIRA-1004.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@761328 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Fay Wang 2009-04-02 15:40:13 +00:00
parent f21f7b5ae5
commit 19371ce174
1 changed files with 6 additions and 1 deletions

View File

@ -2270,8 +2270,13 @@ public class PCEnhancer {
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);