New Posts New Posts RSS Feed: Cascading Delete
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Cascading Delete

 Post Reply Post Reply
Author
sven4tmn View Drop Down
Newbie
Newbie
Avatar

Joined: 22-Feb-2011
Posts: 5
Post Options Post Options   Quote sven4tmn Quote  Post ReplyReply Direct Link To This Post Topic: Cascading Delete
    Posted: 17-Aug-2012 at 2:37am
Hi,

I created cascading deletions on SqlServer, updated my entity model and ran custom tool. Now, if I delete a entity the child record's foreign key changes to empty guid and switches state to modified. Saving changes tries now to save modified child entity and retrieves error from DB (foreign key violation). Deleting entity directly on SqlServer works fine and cascades deletion.

Do I need further settings or what am I doing wrong?

Thank you
Sven

DevForce: 6.1.8
Cocktail: 1.0

Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 20-Aug-2012 at 1:17pm
Sven,
 
I could not reproduce the issue here.
I am attaching a sample solution where I took the same steps as you did: updated the database for cascade delete the orders related to a customer (I updated the FK_Order_Customer Delete Rule to Cascade), updated the model from database, and ran the sample. (Note I attached a "modified version of NorthwindIB, so you wouldn't run into other constraints while trying to delete)
 
Regards,
   Silvio. 
 
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down