Question
Is having a default non-null value for a navigation property to an owned entity type supported in EF Core? I've seen the docs and issues like #18007 that this shouldn't be done for non-collection navigations to regular entity types, but this presumably do not cover owned entities because they are an integral part of of owning entity and I do not see any harm in doing this. Is my assessment correct?
Your code
[Owned]
class Owned;
class Owner
{
public Owned NavProp { get; set; } // = new();
}
EF Core version
9.0.0
Database provider
No response
Target framework
.NET 9.0
Operating system
Windows 10
IDE
No response
Question
Is having a default non-null value for a navigation property to an owned entity type supported in EF Core? I've seen the docs and issues like #18007 that this shouldn't be done for non-collection navigations to regular entity types, but this presumably do not cover owned entities because they are an integral part of of owning entity and I do not see any harm in doing this. Is my assessment correct?
Your code
EF Core version
9.0.0
Database provider
No response
Target framework
.NET 9.0
Operating system
Windows 10
IDE
No response