relationships: fixed removing entity with compulsory foreign key