The method getCascadableChildrenIterator within CascadingActions.PERSIST return all elements of a collection (getAllElementsIterator) instead of only the loaded ones (getLoadedElementsIterator). This contradicts the code comment in the line directly above. The fix consists of replacing 'getAllElementsIterator' with 'getLoadedElementsIterator'. It is included in the attached pull request. Thanks go to Sebastian Viefhaus for preparing the testing and contribution environment. |