// instance before asking our context
OpenJPAStateManager sm;
if (ImplHelper.isManageable(obj)) {
PersistenceCapable pc = ImplHelper.toPersistenceCapable(obj,
getRepository().getConfiguration());
sm = (OpenJPAStateManager) pc.pcGetStateManager();
if (sm == null) {
ret = getValueFromUnmanagedInstance(obj, cols, true);
} else if (sm.isDetached()) {
obj = store.getContext().find(sm.getObjectId(), false, null);
sm = store.getContext().getStateManager(obj);