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
{{ message }}
Repository navigation
Improve warning message for warning "The same entity is being tracked as different weak entity types"? #20474
Currently when owned entities reference a static instance (e.g., a enumeration), we see the following: The same entity is being tracked as different weak entity types 'Order.Fees#Currency' and 'Order.TotalCost#Currency'. If a property value changes it will result in two store changes, which might not be the desired outcome. which isn't very clear as to what the steps to resolve the issue/work around it are. Alluding to ensuring all owned entities are required to be new instances and not shared would be more clear. What's the behavior if the warning is ignored? I'm not seeing the "two store" changes effect.
Reacted by Dan, BastiaanLouis, Ivelin Kirilov, Thiago F., Changhui Xu, John Lomen and pkazakov-dev
How to suppress this warning? I use owned types for immutable value objects that cannot be changed. In this case, it is convenient to use shared object.
What's the behavior if the warning is ignored? I'm not seeing the "two store" changes effect.
The "two store" changes effect will be when you change the shared owned entity before calling SaveChanges.
How to suppress this warning? I use owned types for immutable value objects that cannot be changed. In this case, it is convenient to use shared object.
What's the behavior if the warning is ignored? I'm not seeing the "two store" changes effect.
The "two store" changes effect will be when you change the shared owned entity before calling SaveChanges.
Activity
Alksar commentedon Aug 3, 2020
How to suppress this warning? I use owned types for immutable value objects that cannot be changed. In this case, it is convenient to use shared object.
The "two store" changes effect will be when you change the shared owned entity before calling SaveChanges.
AndriySvyryd commentedon Aug 3, 2020
.ConfigureWarnings(w => w.Ignore(CoreEventId.DuplicateDependentEntityTypeInstanceWarning))vflame commentedon Oct 8, 2020
As in value change or as in reference change?
ajcvickers commentedon Oct 19, 2020
@vflame Mutation.
CaringDev commentedon Aug 14, 2024
Would be perfect if configurable per entity type. In general, the warning is fine, I'd like to suppress it for (manually) verified immutable types.