From fee1e9545ac567b184418b8469d18fc3255c506c Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 12 Jul 2024 18:22:01 +0000 Subject: [PATCH] fix: one-to-one excluded list issue --- packages/nocodb/src/db/BaseModelSqlv2.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index c2c6c631cb..9117fb26c8 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -2635,9 +2635,16 @@ class BaseModelSqlv2 { ).getModel(this.context); const childView = await relColOptions.getChildView(this.context); - - const childTn = this.getTnPath(childTable); - const parentTn = this.getTnPath(parentTable); + const parentBaseModel = await Model.getBaseModelSQL({ + dbDriver: this.dbDriver, + model: parentTable, + }); + const childBaseModel = await Model.getBaseModelSQL({ + dbDriver: this.dbDriver, + model: childTable, + }); + const childTn = childBaseModel.getTnPath(childTable); + const parentTn = parentBaseModel.getTnPath(parentTable); const rtn = parentTn; const tn = childTn;