Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RevEng: Don't scaffold facets for when type is aliased #10003

Closed
smitpatel opened this issue Oct 6, 2017 · 2 comments
Closed

RevEng: Don't scaffold facets for when type is aliased #10003

smitpatel opened this issue Oct 6, 2017 · 2 comments
Assignees
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. type-bug

Comments

@smitpatel
Copy link
Contributor

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 like nvarchar(16) aliased as MyType we generate property.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.

@bricelam
Copy link
Contributor

bricelam commented Oct 9, 2017

We should leave the facets on and just always scaffold them. As you said, doing this would also fix #9580.

@ajcvickers ajcvickers modified the milestones: 2.1.0-preview1, 2.1.0 Jan 17, 2018
@ajcvickers
Copy link
Member

Closing this for now since the demand seems low. If this is something you need, then please feel free to comment saying how this is impacting you and we we re-assess.

@ajcvickers ajcvickers added closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. closed-not-needed type-bug and removed closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. type-bug propose-punt labels Jan 27, 2018
@ajcvickers ajcvickers removed this from the 2.1.0 milestone Jan 27, 2018
@ajcvickers ajcvickers added the closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. label Mar 10, 2022
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. type-bug
Projects
None yet
Development

No branches or pull requests

3 participants