From 94b40775a196b33d3c1709f873673106610b08b7 Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Tue, 24 Aug 2021 18:19:03 +0530 Subject: [PATCH] Allow the referenced table to be the same as the local table in one to many relationship for ERD Tool. Fixes #6495 --- docs/en_US/release_notes_5_7.rst | 1 + .../tools/erd/static/js/erd_tool/dialogs/OneToManyDialog.js | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/en_US/release_notes_5_7.rst b/docs/en_US/release_notes_5_7.rst index 4d1369965..1201471b3 100644 --- a/docs/en_US/release_notes_5_7.rst +++ b/docs/en_US/release_notes_5_7.rst @@ -11,6 +11,7 @@ New features | `Issue #4264 `_ - Make code folding case insensitive in the code mirror. | `Issue #4629 `_ - Added database and server information on the Maintenance process watcher dialog. +| `Issue #6495 `_ - Allow the referenced table to be the same as the local table in one to many relationship for ERD Tool. | `Issue #6691 `_ - Set PSQLRC and PSQL_HISTORY env vars to apt. user storage path in the server mode. Housekeeping diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/dialogs/OneToManyDialog.js b/web/pgadmin/tools/erd/static/js/erd_tool/dialogs/OneToManyDialog.js index 21c99acb6..6f4fcf594 100644 --- a/web/pgadmin/tools/erd/static/js/erd_tool/dialogs/OneToManyDialog.js +++ b/web/pgadmin/tools/erd/static/js/erd_tool/dialogs/OneToManyDialog.js @@ -63,9 +63,6 @@ export default class OneToManyDialog { editable: true, options: (view)=>{ let retOpts = []; _.forEach(tableNodesDict, (node, uid)=>{ - if(uid === view.model.get('local_table_uid')) { - return; - } let [schema, name] = node.getSchemaTableName(); retOpts.push({value: uid, label: `(${schema}) ${name}`}); });