-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
After second SaveChanges() EF loses added new dependents #5734
Comments
@AlexBilonog Can you post the code for the entity types User and UserDepartment and any code you have in OnConfiguring? Note for triage: I have been able to reproduce the issue where the navigation properties get corrupted, but so far not the conceptual null exception. |
Unfortunately I can provide code only next Monday. But I can add some details. UserID is NOT NULL FK. On Delete and On Update setting is Restrict. DB is SqlServer 2012. |
Issue #5734 When we encounter an untracked entity in a navigation we save it for later fixup, but we were not adding these entities to the snapshot for the navigation. This later caused change detection to be confused, which resulted in the entities being removed from the navigation.
I am getting this issue on 1.1.0 exact same code style as originally posted and same error. |
@dc-m Please open a new issue and include a project or the code needed to reproduce what you are seeing. |
After second SaveChanges() EF loses added new dependents:
EF Core version: 1.0.0-rc3-21338
Operating system: Windows 10
Visual Studio version: VS 2015 last updates
StackTrace:
The text was updated successfully, but these errors were encountered: