I got a collection property where the collection elements are not marked as "dependent-element", but the mapping field is not nullable. When I remove such elements from that collection, they are (unexpectedly) automatically deleted.
This is caused by FkSetStore.checkRemovalOfElementShouldDelete(ownerSM) returning true, code comment is "Field is not dependent, and is not nullable so we just delete the elements".
Expected behavior would be that I can remove the element and add it to another collection. If I did not add it to another collection, I'd get an exception during flush() or commit().
Test case follows.