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
Let's have an entity Person with an owned type Address. When I replace the Address in the Person entity with another Address, the change tracker doesn't show any changes that would imply the Address of Person was changed.
The shadow PK FK is unchanged for original Address, too, pointing it to original Person object.
Table splitting (sharing) is used for below example, but the same thing happens when second table is used.
@MartinBuna The context doesn't detect changes immediately. To get the view of what SaveChanges will actually see call context.ChangeTracker.DetectChanges() first:
Let's have an entity Person with an owned type Address. When I replace the Address in the Person entity with another Address, the change tracker doesn't show any changes that would imply the Address of Person was changed.
The shadow PK FK is unchanged for original Address, too, pointing it to original Person object.
Table splitting (sharing) is used for below example, but the same thing happens when second table is used.
Original change tracker full debug output:
Code to test this: https://github.com/MartinBuna/EfCoreOwnedTypeProblem/blob/main/EfCoreOwnedTypeProblem/Program.cs
I haven't found this in #22954 and I thought it should me mentioned.
The text was updated successfully, but these errors were encountered: