I have the following table structure:
CREATE TABLE [SomeTable]
(
[SomeTableID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[PersonID] INTEGER NOT NULL REFERENCES [Person](PersonID) ON DELETE CASCADE
)
CREATE TABLE [Person]
(
[PersonID] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT
)
When using the model designer in entity framework I choose "Update model from database" and then import those two tables. It reconizes the relationship between the two tables properly but if you check the FK's properties the OnDelete settingsaren't pulled from the DB. They are left on "None". If I then try to delete a Person record that has relating SomeTable records then it crashes saying that you can't null the PersonID in the SomeTable records. If I manually change the OnDelete property of the FK to Cascade just like the DB is set to then everything works as expected.