try {
for (Field f : cascadeAttributes) {
f.setAccessible(true);
Object fieldValue = f.get(entity);
AssociationType at = ModelUtilities.getAssociationType(f, mode);
if (f.getAnnotation(PersistentAttribute.class) != null){
try {
if (fieldValue == null && AssociationType.REQUIRED.equals(at)) {
throw new InternalErrorException("PersistAction::persistAssociatedAttributes -> You tried to persist a null value for " +