delete relation on detach