You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :
The text was updated successfully, but these errors were encountered:
graphicsxp
changed the title
Handling deleted and updated entities in the same saveChanges call
Handling deleted and updated entities in the same saveChanges call when cascade delete is configure in the db
Oct 26, 2021
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 :
The text was updated successfully, but these errors were encountered: