diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Contracts/NodeInfo.cs b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Contracts/NodeInfo.cs index 5aebcfc6..ba5a879b 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Contracts/NodeInfo.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Contracts/NodeInfo.cs @@ -25,6 +25,12 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts /// public string NodePath { get; set; } + /// + /// The path of the parent node. This is going to be used by the client side to determine the parent node. + /// We are not referencing the parent node directly because the information needs to be passed between processes. + /// + public string ParentNodePath { get; set; } + /// /// The type of the node - for example Server, Database, Folder, Table /// diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Nodes/TreeNode.cs b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Nodes/TreeNode.cs index cd07047e..0f50b99b 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Nodes/TreeNode.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Nodes/TreeNode.cs @@ -229,6 +229,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes IsLeaf = this.IsAlwaysLeaf, Label = this.Label, NodePath = this.GetNodePath(), + ParentNodePath = this.Parent?.GetNodePath() ?? "", NodeType = this.NodeType, Metadata = this.ObjectMetadata, NodeStatus = this.NodeStatus,