From 135dbae3ce143ab4524793d56d3de35cc70a4297 Mon Sep 17 00:00:00 2001 From: delchev Date: Wed, 6 Mar 2024 16:18:19 +0200 Subject: [PATCH] fix for nosql import/export --- .../dirigible/ide-database/explorer/explorer.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/components/ide/ide-ui-database/src/main/resources/META-INF/dirigible/ide-database/explorer/explorer.js b/components/ide/ide-ui-database/src/main/resources/META-INF/dirigible/ide-database/explorer/explorer.js index 2de3dd2e616..fec53939b5f 100644 --- a/components/ide/ide-ui-database/src/main/resources/META-INF/dirigible/ide-database/explorer/explorer.js +++ b/components/ide/ide-ui-database/src/main/resources/META-INF/dirigible/ide-database/explorer/explorer.js @@ -502,9 +502,8 @@ database.controller('DatabaseController', function ($scope, $http, messageHub) { "action": function (data) { let tree = $.jstree.reference(data.reference); let node = tree.get_node(data.reference); - let topLevelSchemaNode = node.parents.find(parentId => tree.get_node(parentId).original.kind === 'schema'); - let topLevelSchemaName = tree.get_text(topLevelSchemaNode); - let sqlCommand = topLevelSchemaName + "." + node.original.text; + let parentNodeName = tree.get_text(node.parent); + let sqlCommand = parentNodeName + "." + node.original.text; messageHub.postMessage('database.data.export.artifact', sqlCommand); }.bind(this) }; @@ -515,9 +514,8 @@ database.controller('DatabaseController', function ($scope, $http, messageHub) { "action": function (data) { let tree = $.jstree.reference(data.reference); let node = tree.get_node(data.reference); - let topLevelSchemaNode = node.parents.find(parentId => tree.get_node(parentId).original.kind === 'schema'); - let topLevelSchemaName = tree.get_text(topLevelSchemaNode); - let sqlCommand = topLevelSchemaName + "." + node.original.text; + let parentNodeName = tree.get_text(node.parent); + let sqlCommand = parentNodeName + "." + node.original.text; messageHub.postMessage('database.data.import.artifact', sqlCommand); }.bind(this) };