clear relationships involving subrecords when removing subrecords