}
illegalOrphanMessages.add("You must retain Tagcorrelations " + tagcorrelationsList1OldTagcorrelations + " since its mainTagId field is not nullable.");
}
}
if (illegalOrphanMessages != null) {
throw new IllegalOrphanException(illegalOrphanMessages);
}
List<Coursetag> attachedCoursetagListNew = new ArrayList<Coursetag>();
for (Coursetag coursetagListNewCoursetagToAttach : coursetagListNew) {
coursetagListNewCoursetagToAttach = em.getReference(coursetagListNewCoursetagToAttach.getClass(), coursetagListNewCoursetagToAttach.getId());
attachedCoursetagListNew.add(coursetagListNewCoursetagToAttach);