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: Values passed to WithPartionKey should be model values, not store values #33535

Closed
ajcvickers opened this issue Apr 14, 2024 · 0 comments · Fixed by #33536
Closed

Cosmos: Values passed to WithPartionKey should be model values, not store values #33535

ajcvickers opened this issue Apr 14, 2024 · 0 comments · Fixed by #33536
Labels
area-cosmos breaking-change closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@ajcvickers
Copy link
Contributor

For example, currently if the partition key is an int mapped to a string in the database, then the string value is required. Instead, the application should always pass the value as it is defined in their model, and EF should convert to string if needed.

@ajcvickers ajcvickers self-assigned this Apr 14, 2024
@ajcvickers ajcvickers added this to the 9.0.0 milestone Apr 14, 2024
@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 Apr 14, 2024
ajcvickers added a commit that referenced this issue Apr 14, 2024
Fixes #28186
Fixes #28265
Fixes #33535

Also:
- Allow non-string partition key values
- Warn if no partition key has been defined
- Use a value converter if needed for values passed to WithPartitionKey (This is probably a bug, but should be docced as a breaking change anyway.)
ajcvickers added a commit that referenced this issue May 1, 2024
Fixes #28186
Fixes #28265
Fixes #33535

Also:
- Allow non-string partition key values
- Warn if no partition key has been defined
- Use a value converter if needed for values passed to WithPartitionKey (This is probably a bug, but should be docced as a breaking change anyway.)
ajcvickers added a commit that referenced this issue May 1, 2024
Fixes #28186
Fixes #28265
Fixes #33535

Also:
- Allow non-string partition key values
- Warn if no partition key has been defined
- Use a value converter if needed for values passed to WithPartitionKey (This is probably a bug, but should be docced as a breaking change anyway.)

Updated based on review feedback
@ajcvickers ajcvickers modified the milestones: 9.0.0, 9.0.0-preview5 May 2, 2024
@ajcvickers ajcvickers removed their assignment Aug 31, 2024
@roji roji modified the milestones: 9.0.0-preview5, 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 breaking-change closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants