I have two objects in my model
Car and car
with a ratio of 1: n.
I want to remove the cascade of the essence of the car. upon removal, I get the following exception:
The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a relationship, the related foreign-key property is set to a null value. If the foreign-key does not support null values, a new relationship must be defined, the foreign-key property must be assigned another non-null value, or the unrelated object must be deleted.
I think he is trying to first remove the object of the car, and then parts of the car.
This cannot be done due to a foreign key.
How can I handle this?
I obviously want to remove carPart first and then only the car.
Thanks.
source share