Browse Source

fix: avoid fields from nested ast object

Signed-off-by: Pranav C <pranavxc@gmail.com>
test/query-opt-imp
Pranav C 2 years ago
parent
commit
ed6e7f3d21
  1. 10
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts

10
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts

@ -95,16 +95,18 @@ const getAst = async ({
.getColOptions<LinkToAnotherRecordColumn>()
.then((colOpt) => colOpt.getRelatedTable());
value = await getAst({
value = (
await getAst({
model,
query: query?.nested?.[col.title],
extractOnlyPrimaries: nestedFields !== '*',
dependencyFields: (dependencyFields.nested[col.title] = dependencyFields
.nested[col.title] || {
dependencyFields: (dependencyFields.nested[col.title] =
dependencyFields.nested[col.title] || {
nested: {},
fields: new Set(),
}),
});
})
).ast;
}
const isRequested =

Loading…
Cancel
Save