Fix issue with reading and saving mongo documents with shard key (#1269)

This commit is contained in:
victor-meng 2022-05-11 18:12:12 -07:00 committed by GitHub
parent 0b6bb7a985
commit 37122acc33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,7 +133,7 @@ export default class Collection implements ViewModels.Collection {
if (partitionKeyProperty.indexOf("$v") > -1) {
// From $v.shard.$v.key.$v > shard.key
partitionKeyProperty = partitionKeyProperty.replace(/.\$v/g, "").replace(/\$v./g, "");
this.partitionKeyPropertyHeaders[i] = partitionKeyProperty;
this.partitionKeyPropertyHeaders[i] = "/" + partitionKeyProperty;
}
}