Make sure all involved entities get detached after delete