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: Inherit partition key definition from parent by convention #34176

Closed
roji opened this issue Jul 7, 2024 · 0 comments · Fixed by #34252
Closed

Cosmos: Inherit partition key definition from parent by convention #34176

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

Comments

@roji
Copy link
Member

roji commented Jul 7, 2024

When defining an inheritance mapping in Cosmos, the partition key must be explicitly defined for children, and it must be identical to that of the parents. We should just inherit these definitions by convention, like we do for e.g. primary keys.

Probably ensure that we do the same for the container and JSON ID property definition as well...

The partition key properties for entity type 'SharedContainerEntity1' are 'PartitionKey', while the partition key properties for entity type 'SharedContainerEntity2Child' are '', and both entity types are mapped to the container 'SharedContainer'. All entity types mapped to the same container must have compatible partition keys defined.
@ajcvickers ajcvickers self-assigned this Jul 7, 2024
@ajcvickers ajcvickers added this to the 9.0.0 milestone Jul 8, 2024
ajcvickers added a commit that referenced this issue Jul 19, 2024
…t entity in the hierarchy by default

Fixes #34176

Also, model validation.
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jul 19, 2024
ajcvickers added a commit that referenced this issue Jul 22, 2024
…t entity in the hierarchy by default

Fixes #34176

Also, model validation.
ajcvickers added a commit that referenced this issue Jul 23, 2024
…t entity in the hierarchy by default

Fixes #34176

Also, model validation.
ajcvickers added a commit that referenced this issue Jul 28, 2024
…t entity in the hierarchy by default

Fixes #34176

Also, model validation.
ajcvickers added a commit that referenced this issue Jul 28, 2024
…t entity in the hierarchy by default

Fixes #34176

Also, model validation.
@ajcvickers ajcvickers modified the milestones: 9.0.0, 9.0.0-rc1 Aug 21, 2024
@ajcvickers ajcvickers removed their assignment Aug 31, 2024
@roji roji modified the milestones: 9.0.0-rc1, 9.0.0 Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-cosmos area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-enhancement
Projects
None yet
2 participants