if (api.isPersistable(entry.getKey()))
{
if (!api.isPersistent(entry.getKey()) && !api.isDetached(entry.getKey()))
{
// Key is not persistent so throw exception
throw new ReachableObjectNotCascadedException(mmd.getFullFieldName(), entry.getKey());
}
}
if (api.isPersistable(entry.getValue()))
{
if (!api.isPersistent(entry.getValue()) && !api.isDetached(entry.getValue()))
{
// Value is not persistent so throw exception
throw new ReachableObjectNotCascadedException(mmd.getFullFieldName(), entry.getValue());
}
}
}
replaceFieldWithWrapper(ownerOP, value, false, false);
}