added foreign key reset when entity is deleted from collection