Entity Framework 4.0 RC: Cannot insert the value NULL into column '*_Id', table 'Paragraphs'; column does not allow nulls. INSERT fails. The statement has been terminated.
Posted by Anders Vindberg
in Lunarmedia Blog
on the 08 Apr. 2010 (37,875 views).
Entity Framework 4.0 RC bug. Usually after an "update model from database" I encounter this error message: Cannot insert the value NULL into column '*_Id', table 'column does not allow nulls. INSERT fails. The statement has been terminated.
To fix the association between the many-to-one relationship (in my case Paragraphs to Translation), you need to edit the .edmx model file and remove StoreGeneratedPattern="Identity" from the Paragraphs node.
See more here: http://stackoverflow.com/questions/2243618/how-do-you-insert-or-update-many-to-many-tables-in-net-entity-framework/2339834#2339834