I have a very complex database model. My program computes some data+db entries
and modifies+generates new entries
to update+insert in the database.
When I use database context to insert the entries, everything works. But when I try to save changes:
{"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 have seen too many questions on SO about this topic. But my problem is that the model is so complex that I cannot track the issue. Entity Framework 6 is not giving me any information about the source of the problem, relationship name, ...
Is there a way to get more help from Entity Framework in order to find the source of the problem?