Skip to content

Conversation

@AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Oct 2, 2023

Fixes #31664

Description

When an owned entity type contains and int property that is configured as the key EF assumes that it is a client-generated ordinal that shouldn't be persisted.

Customer impact

For models with matching shape the key property values are replaced with ordinals, causing data loss.

How found

Customer reported on 6.0

Regression

No.

Testing

Added tests.

Risk

Low.

@AndriySvyryd AndriySvyryd requested a review from a team October 2, 2023 19:45
@AndriySvyryd AndriySvyryd changed the title Cosmos: persist non-shadow int keys on owned entity types [release/8.0] Cosmos: persist non-shadow int keys on owned entity types Oct 2, 2023
@AndriySvyryd AndriySvyryd merged commit 2a7a49b into release/8.0 Oct 3, 2023
@AndriySvyryd AndriySvyryd deleted the Issue31664 branch October 3, 2023 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A property on a nested owned entity is not being saved in the CosmosDB document

2 participants