Skip to content

Prevent dependents from being deleted when principal is detached - #19379

Merged
ajcvickers merged 1 commit into
masterfrom
AhHaCaughtYou1220
Dec 22, 2019
Merged

ajcvickers merged 1 commit into
masterfrom
AhHaCaughtYou1220

Conversation

@ajcvickers

Copy link
Copy Markdown
Contributor

Fixes #12590
Fixes #18982
Regression test for #16546

@AndriySvyryd

Copy link
Copy Markdown
Member

I think you meant "Prevent dependents from being deleted when principal is detached"

@ajcvickers
ajcvickers merged commit f77c79b into master Dec 22, 2019
@ajcvickers
ajcvickers deleted the AhHaCaughtYou1220 branch December 22, 2019 21:36
@shaulbehr

Copy link
Copy Markdown

Thanks for fixing! What release will this be in?

@ErikEJ

ErikEJ commented Dec 30, 2019

Copy link
Copy Markdown
Contributor

5.0 !

@ajcvickers ajcvickers changed the title Prevent dependents from being deleted when principal is deleted Prevent dependents from being deleted when principal is detached Dec 30, 2019
@silvajpr

Copy link
Copy Markdown

Not acceptable to be release only on version 5!
By the way for me the Expected behavior is the related objects should KEEP / REMAIN the actual state - it shouldn’t be affected - it’s the beahvior of EF6 and EFCore 2.2.
Exemple: if the related object state is Added it should continue with that state!
For me doesn’t make sense to also detach the related objects.
Take this example: the principal exist in the DB and I simply want to remove it from the tracking changes, without any side effects in the related objects! (Maybe I have change some value and I don’t want it to be saved or another reason).
How can I do what I just explained?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detaching an entity results in related entities being deleted Handle entity replacement in TrackGraph with better exception/message

5 participants