Configuring a custom type mapper for a generated column breaks value generation #11010
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Version: 2.1.0-preview2-30132
When using a type mapper as described in #242 on a generated column, EF Core seems to use the model type instead of the provider type to check if its value can be generated.
To reproduce, create an entity with a rowversion property and configure a custom type mapper on that property. EF Core will not handle it as a rowversion column after this.
The fix might be changing .ClrType to .GetProviderClrType() in ValueGeneratorConvention.cs, but I have not tested this and I don't know what other implications this might have.
The text was updated successfully, but these errors were encountered: