&& !hasPCPrimaryKeyFields(meta)) {
Class<?> type = meta.getDescribedType();
PersistenceCapable pc = PCRegistry.newInstance(type, null, oid,
false);
Object copy = pc.pcNewObjectIdInstance();
pc.pcCopyKeyFieldsToObjectId(copy);
return copy;
}
Object copy = (!meta.isObjectIdTypeShared()) ? oid
: ((ObjectId) oid).getId();