withLogging(pojo, new Runnable() {
@Override
public void run() {
final PersistenceCapable pc = pojo;
final Version datastoreVersion = getVersionIfAny(pc);
final RootOid originalOid ;
ObjectAdapter originalAdapter = getAdapterManager().getAdapterFor(pojo);
if(originalAdapter != null) {
ensureRootObject(pojo);
originalOid = (RootOid) originalAdapter.getOid();
final Version originalVersion = originalAdapter.getVersion();
// sync the pojo held by the adapter with that just loaded
getPersistenceSession().remapRecreatedPojo(originalAdapter, pojo);
// since there was already an adapter, do concurrency check
// (but don't set abort cause if checking is suppressed through thread-local)
final RootOid thisOid = originalOid;
final Version thisVersion = originalVersion;
final Version otherVersion = datastoreVersion;
if(thisVersion != null &&
otherVersion != null &&
thisVersion.different(otherVersion)) {