-
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
Delay synthesis of join entities until entire graph is attached #24572
Conversation
bcd02b9
to
9c25ab3
Compare
@@ -47,27 +47,36 @@ public class EntityGraphAttacher : IEntityGraphAttacher | |||
EntityState targetState, | |||
EntityState storeGeneratedWithKeySetTargetState, | |||
bool forceStateWhenUnknownKey) | |||
=> _graphIterator.TraverseGraph( | |||
{ | |||
rootEntry.StateManager.ResetAttachGraph(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are any danglers at this point why would we discard them?
Also shouldn't we also call CompleteAttachGraph
on DetectChanges
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndriySvyryd I thought some more about where danglers can come from and added additional test cases. This lead to a change where I made it more explicit that this is a Begin/End behavior.
Fixes #23339 This stops the change tracker creating a join entity instance for the same join entity that is later discovered in the graph.
9c25ab3
to
6a51cbe
Compare
Fixes #23339
This stops the change tracker creating a join entity instance for the same join entity that is later discovered in the graph.