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

Cosmos: Stop generating discriminator clause when not needed #34145

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

roji
Copy link
Member

@roji roji commented Jul 2, 2024

Note: this PR is based on top of #34143, review last commit only

@AndriySvyryd this doesn't do validation (which is also part of #20268), we can split that out or if if you feel like it, just push it into this PR?

Closes #20268

@roji roji requested a review from a team July 2, 2024 23:56
@AndriySvyryd
Copy link
Member

@AndriySvyryd this doesn't do validation (which is also part of #20268), we can split that out or if you feel like it, just push it into this PR?

The validation should be pretty simple, just add it

@roji
Copy link
Member Author

roji commented Jul 3, 2024

Validate all types mapped to a collection have the same configuration

Which configuration exactly?

@AndriySvyryd
Copy link
Member

Which configuration exactly?

IsDiscriminatorMappingComplete. It doesn't make sense if it's not set to the same value on all entity types sharing the container.

@roji
Copy link
Member Author

roji commented Jul 3, 2024

@AndriySvyryd done

@roji
Copy link
Member Author

roji commented Jul 3, 2024

Thanks for the quick review @AndriySvyryd, will need to merge the base PRs first before I can do this one.

@roji roji force-pushed the CosmosRemoveDiscriminatorPredicate branch from 25f92b9 to b23a624 Compare July 4, 2024 06:53
@roji roji enabled auto-merge (squash) July 4, 2024 06:53
@roji roji force-pushed the CosmosRemoveDiscriminatorPredicate branch from b23a624 to 2e69af4 Compare July 4, 2024 09:49
@roji roji requested a review from maumar as a code owner July 4, 2024 09:49
@roji roji force-pushed the CosmosRemoveDiscriminatorPredicate branch from 2e69af4 to 6d13fff Compare July 4, 2024 09:50
@roji roji merged commit 20edb63 into dotnet:main Jul 4, 2024
7 checks passed
@roji roji deleted the CosmosRemoveDiscriminatorPredicate branch July 4, 2024 10:55
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.

Cosmos: Leverage complete discriminator mapping
3 participants