core: prevent cascading deletes on some relationships.