Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M to M-deleting relationship plus item on other side #237

Open
cbgreely opened this issue Sep 1, 2020 · 0 comments
Open

M to M-deleting relationship plus item on other side #237

cbgreely opened this issue Sep 1, 2020 · 0 comments

Comments

@cbgreely
Copy link

cbgreely commented Sep 1, 2020

I have an M to M relationship. I'll use Employees and Territories as an example, with an intersection table between (let's call it Employee_x_Territories). I am trying to remove the relationship between an Employee and a Territory, plus the Territory record at the same time (it is the only use of the specific Territory...no other Employees link to it). Employee_x_Territories is a change tracking collection in Employee. I am able to remove the relationship by removing the specific Employee_x_Territories entity from that change tracking collection, but I am unable to remove the Territory record itself by setting the Territory record's TrackingState property to Deleted. The result of GetChanges is a deleted Employee_x_Territories record, with a Territory property of null. I expected the Territory property to be the Territory record with a TrackingState of deleted.

Hope that is understandable. Can you tell me what I may be doing wrong?

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

No branches or pull requests

1 participant