From 37122acc3372b21a358adaacade26d4101950362 Mon Sep 17 00:00:00 2001 From: victor-meng <56978073+victor-meng@users.noreply.github.com> Date: Wed, 11 May 2022 18:12:12 -0700 Subject: [PATCH] Fix issue with reading and saving mongo documents with shard key (#1269) --- src/Explorer/Tree/Collection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Explorer/Tree/Collection.ts b/src/Explorer/Tree/Collection.ts index 9ef429df4..c5995b8df 100644 --- a/src/Explorer/Tree/Collection.ts +++ b/src/Explorer/Tree/Collection.ts @@ -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; } }