Skip to content

Conversation

@AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Dec 18, 2024

Fixes #35325

@AndriySvyryd AndriySvyryd requested a review from a team as a code owner December 18, 2024 01:28
@AndriySvyryd AndriySvyryd changed the title Cleanup CosmosJsonIdConvention Cosmos: Create shadow property for id if key cannot be used Dec 18, 2024
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/EFCore.Cosmos/Metadata/Conventions/CosmosJsonIdConvention.cs:121

  • Check the changes related to computedIdPropertyBuilder for unintended side effects.
if (clrType == typeof(string) && keyProperty.Builder.CanSetJsonProperty(IdPropertyJsonName))

src/EFCore.Cosmos/Metadata/Conventions/CosmosPartitionKeyInPrimaryKeyConvention.cs:79

  • The method 'PrimaryKey' does not exist on 'IConventionEntityTypeBuilder'. It should be 'HasKey'.
entityTypeBuilder.PrimaryKey(primaryKeyProperties);

@AndriySvyryd AndriySvyryd merged commit 4458035 into main Jan 28, 2025
7 checks passed
@AndriySvyryd AndriySvyryd deleted the CosmosCleanup branch January 28, 2025 20:11
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.

EF9 Cosmos provider does not map a property with HasKey() to the db id property

3 participants