Object instance = invocation.getParameters().toArray()[0];
UnitOfWork uow = xrService.getORSession().acquireUnitOfWork();
// read the existing object into the uow
uow.readObject(instance);
// overwrite it
uow.mergeClone(instance);
uow.commit();
return null;
}
}