// Go through all related fields and attach them (including relationships)
internalAttachCopy(this, smDetachedPC, smDetachedPC.loadedFields, smDetachedPC.dirtyFields, persistent,
smDetachedPC.myVersion, true);
// Remove the state manager from the detached PC
detachedPC.jdoReplaceStateManager(null);
// Remove the corss-referencing now we have finished the attach process
smDetachedPC.referencedPC = null;
this.referencedPC = null;