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

Configure nested types as complex types by default #31275

Open
roji opened this issue Jul 15, 2023 · 2 comments
Open

Configure nested types as complex types by default #31275

roji opened this issue Jul 15, 2023 · 2 comments

Comments

@roji
Copy link
Member

roji commented Jul 15, 2023

When mapping a complex type hierarchy, the user must currently manually configure each and every non-primitive property as complex; we should consider doing this by convention the moment the top-most containing property is configured as complex.

This is similar to the situation with JSON and owned (one of these must be manually specified for the entire hierarchy). As discussed, I'm assuming that even when we enable regular navigations from complex types out of the complex hierarchy, we'd still not want that to be the default.

@AndriySvyryd
Copy link
Member

Currently, once something is marked as a complex type then all references to it will be configured as complex properties. This means that with the above change everything transitively referenced from a complex type will be considered a complex type. For some models this could result in every type except the ones explicitly mapped as entity types to become complex types. We should discuss whether this is the desired behavior.

@roji
Copy link
Member Author

roji commented Jul 24, 2023

Note #31344, which is about removing the behavior that a CLR type is configured as a complex type if it's configure elsewhere in the model as a complex type. This should take care of the above objection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants