Skip to content

Conversation

@ajcvickers
Copy link
Contributor

This means it gets correctly filtered out when using the model for code generation, and hence we don't try to generate a literal for it.

Fixes #34996

@ajcvickers ajcvickers requested a review from a team as a code owner October 30, 2024 13:59
@ajcvickers ajcvickers removed the request for review from a team October 30, 2024 13:59
@ajcvickers ajcvickers force-pushed the OTJ73 branch 2 times, most recently from 1840961 to 121c280 Compare October 30, 2024 15:09
@ajcvickers ajcvickers requested a review from a team November 11, 2024 10:24
This means it gets correctly filtered out when using the model for code generation, and hence we don't try to generate a literal for it.

Fixes #34996
IConventionModelBuilder modelBuilder,
IConventionContext<IConventionModelBuilder> context)
=> modelBuilder.Metadata.RemoveAnnotation(StateAnnotationName);
=> modelBuilder.Metadata.RemoveAnnotation(CoreAnnotationNames.NonNullableConventionState);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the annotation left in the model in the repro? This should've removed it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ModelFinalizing isn't called on the database model.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relational model is produced from the normal model and the normal model should not have this annotation after this convention runs.
How does the annotation end up in the model?

@ajcvickers ajcvickers merged commit dc812a2 into main Nov 14, 2024
7 checks passed
@ajcvickers ajcvickers deleted the OTJ73 branch November 14, 2024 10:30
AndriySvyryd pushed a commit that referenced this pull request Dec 19, 2024
This means it gets correctly filtered out when using the model for code generation, and hence we don't try to generate a literal for it.

Fixes #34996
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReadOnlyCollection<string> with private backing field throws exception on NullabilityInfoContext when trying to add migration

4 participants