Improve warning message for warning "The same entity is being tracked as different weak entity types"?

Open
#20,474 5 comments 7 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Assessment

This issue has not been assessed yet.

Description

area-dbcontext customer-reported

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.

Dominant language
C#
Stars
14.8k
Forks
3.4k
Avg merge
2d 5h
Merged PRs (30d)
134

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/efcore

All issues in dotnet/efcore

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.