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

Only discover complex types when configured through pre-convention model configuration #31344

Closed
Tracked by #31238
roji opened this issue Jul 24, 2023 · 0 comments · Fixed by #31399
Closed
Tracked by #31238

Only discover complex types when configured through pre-convention model configuration #31344

roji opened this issue Jul 24, 2023 · 0 comments · Fixed by #31399
Labels
area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@roji
Copy link
Member

roji commented Jul 24, 2023

In the current bits, when a CLR type is configured as a complex type in one place, it's picked up as a complex type by convention in other places as well; so a CLR type can be used as a complex type in many places in the model, but only explicitly configured as a complex type once. This means that if the one explicit configuration is removed for some reason, all others become broken in various ways.

Instead, we can add an API to pre-convention model configuration to configure a CLR type as complex, and otherwise require that users explicitly configure.

Note the interaction with #31275, which is about automatically configuring nested complex types as complex. Implementing the behavior above removes the problematic part raised in #31275 (comment).

@AndriySvyryd AndriySvyryd changed the title Add pre-convention model configuration API for complex types Only discover complex types when configured through pre-convention model configuration Jul 26, 2023
@AndriySvyryd AndriySvyryd self-assigned this Jul 26, 2023
@ajcvickers ajcvickers added this to the 8.0.0 milestone Jul 26, 2023
AndriySvyryd added a commit that referenced this issue Aug 2, 2023
…del configuration or annotation

Throw for complex properties of value types
Throw for optional complex properties

Part of #13947
Fixes #31344
AndriySvyryd added a commit that referenced this issue Aug 2, 2023
…del configuration or annotation

Throw for complex properties of value types
Throw for optional complex properties

Part of #13947
Fixes #31344
AndriySvyryd added a commit that referenced this issue Aug 6, 2023
…del configuration or annotation

Throw for complex properties of value types
Throw for optional complex properties

Part of #13947
Fixes #31344
AndriySvyryd added a commit that referenced this issue Aug 7, 2023
…del configuration or annotation

Throw for complex properties of value types.
Throw for optional complex properties.

Part of #13947
Fixes #31344
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Aug 7, 2023
@AndriySvyryd AndriySvyryd removed their assignment Aug 7, 2023
@ajcvickers ajcvickers modified the milestones: 8.0.0, 8.0.0-rc1 Aug 19, 2023
@ajcvickers ajcvickers modified the milestones: 8.0.0-rc1, 8.0.0 Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
3 participants