Open graphicsxp opened 2 years ago
I detach all the children entities before deleting the Publication. It works fine. But this Stackoverflow answer suggests that this would have been implemented in breeze at some point (7 years ago). Is it the case ? https://stackoverflow.com/questions/26724082/cascade-delete-not-working-with-breeze
I'm facing an issue when saving parent and child entities at the same time :
Let's say I have the following entities:
Publication { id: guid; publicationLvs: PublicationLv [ ] } PublicationLv { id: guid; publicationId: guid }
I delete the parent entity :
publication.entityAspect.setDeleted();
Then when I call save changes, the payload looks like this :
So Publication is deleted and PublicationLv is modified with its foreign key
PublicationId
set to a 0 guid.When saveChanges is called on the server (Entity Framework Core), I get a 500 :
It seems breeze doesn't know about the cascade delete configured in the DB. So when it tries to update publicationLv, it was already deleted when the Publication was deleted.
Is this a configuration issue or a bug ? Here's my metadata :