RevEng: Don't scaffold facets for when type is aliased #10003
Labels
closed-out-of-scope
This is not something that will be fixed/implemented and the issue is closed.
type-bug
https://github.com/aspnet/EntityFrameworkCore/blob/dev/src/EFCore.Design/Scaffolding/Internal/RelationalScaffoldingModelFactory.cs#L846-L857
When we have aliased column type, we use underlying type to generate facets. But then we modify ScaffoldingTypeInfo so that we scaffold
HasColumnType
. But we still leave out other facets. That means for underlying type likenvarchar(16)
aliased asMyType
we generateproperty.HasColumnType("MyType").HasMaxLength(16);
Which is redundant/ambiguous/incorrect.Either we can null out all facets. or We can apply facets to property only if inferred type. Or we can leave facets on property (in case we want to generate maxlength like #9580 ), and skip them while writing out the file.
The text was updated successfully, but these errors were encountered: