-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Description
Bug description
When using Table-Per-Hierarchy (TPH) inheritance with owned entities (OwnsOne), EF Core 8 generates an UPDATE statement but omits the owned entity columns when:
- An owned entity property starts as null in the database
- It's then set to an instance where all properties have their CLR default values (e.g., EnumValue.Unknown = 0, IsBool = false)
- Nullable reference types are disabled (disable in the project file)
This leads to data corruption, preventing us from effectively upgrading from EF core 7 to EF core 8/9/10.
Please find a sample repro project attached.
EfCoreEnumNullTest.zip
EF Core version
8/9/10
Database provider
SqlServer
Target framework
.NET 10
IDE
rider
Reactions are currently unavailable