// invoke any preAttach on the detached instance
manager.fireBeforeAttach(toAttach, meta);
// assign the detached pc the same state manager as the object we're
// copying into during the attach process
StateManager smBefore = pc.pcGetStateManager();
pc.pcReplaceStateManager(sm);
int detach = (isNew) ? DETACH_ALL : broker.getDetachState();
FetchConfiguration fetch = broker.getFetchConfiguration();
try {
FieldMetaData[] fmds = meta.getFields();