Reputation: 1471
Is it possible to rename a property like in MongoDB, using C# SDK or migration tool?
I didn’t see any example about it
Upvotes: 2
Views: 2089
Reputation: 4994
DocumentDB is schemaless. There is no structure defined outside documents themselves so each document has their own schema. Hence you cannot rename a property outside of your documents themselves.
What you can and should do, is to fix documents which you consider having wrong schema by updating them. Query docs which have the wrongly named property, rename the property in the documents with you application logic, and update them to DocumentDB collection.
Yes.If I read/modify/replace the old property Will still be stored
I can only assume this must be some mishap in your application logic. If not, then you should provide a minimal verifiable repro case.
Upvotes: 3