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: consider warning/error when attempting to save and a partition key is unset #34716

Open
roji opened this issue Sep 19, 2024 · 0 comments

Comments

@roji
Copy link
Member

roji commented Sep 19, 2024

With #34180, we started warning when an entity is saved and its key property is unset (i.e. the CLR default). The rationale was that it's unlikely that the user actually wants to insert a document with a 0 id property, and likely is expecting the property to be generated like in relational, which it isn't.

We could do the same for partition key properties: if a partition key property is unset, it's quite likely to be an omission rather than actual valid value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants