Browse Source

fix: single query bt lookup

pull/7508/head
mertmit 10 months ago
parent
commit
2e79a236d6
  1. 7
      packages/nocodb/src/db/BaseModelSqlv2.ts

7
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -4636,6 +4636,7 @@ class BaseModelSqlv2 {
protected async substituteColumnIdsWithColumnTitles(
data: Record<string, any>[],
dependencyColumns?: Column[],
aliasColumns?: Record<string, Column>,
) {
const modelColumns = this.model?.columns.concat(dependencyColumns ?? []);
@ -4648,6 +4649,12 @@ class BaseModelSqlv2 {
const btMap: Record<string, boolean> = {};
modelColumns.forEach((col) => {
if (aliasColumns && col.id in aliasColumns) {
aliasColumns[col.id].id = col.id;
aliasColumns[col.id].title = col.title;
col = aliasColumns[col.id];
}
idToAliasMap[col.id] = col.title;
if (col.colOptions?.type === 'bt') {
btMap[col.id] = true;

Loading…
Cancel
Save