Open voroninp opened 1 month ago
@voroninp Ignoring a CLR property with a given name and replacing it with a shadow property of the same name is not supported. In other words, a shadow property can only use a name that is not that of a CLR property.
That was my guess, that this is a limitation. But the error message could be frinedlier in this case ;-)
Here's how I map entities:
When I run
context.Database.EnsureCreatedAsync()
I getInvalidOperationException
:As soon as I change the name of discriminator, everything works fine. If discriminator cannot be named as ignored property this should be in the docs and error message should be more helpful. Here is the repo to reproduce the problem.
Include provider and version information
EF Core version: 8.0.4 Database provider: PostgreSQL Target framework: .NET 8