manager.fireBeforeAttach(pc, meta);
offset = meta.getIdentityType() == meta.ID_DATASTORE ? 1 : 0;
// assign the detached pc the same state manager as the object we're
// copying into during the attach process
pc.pcReplaceStateManager(sm);
BitSet fields = state == null ? null : (BitSet) state[1 + offset];
try {
FieldMetaData[] fmds = meta.getFields();
for (int i = 0; i < fmds.length; i++) {
// only attach fields in the FG of the detached instance; new