Browse Source

Merge pull request #1984 from nocodb/fix/1981-nested-extract-all-fields

fix: Including all fields of nested record
pull/1986/head
աɨռɢӄաօռɢ 3 years ago committed by GitHub
parent
commit
413391bda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/nocodb/src/lib/dataMapper/lib/sql/helpers/getAst.ts

4
packages/nocodb/src/lib/dataMapper/lib/sql/helpers/getAst.ts

@ -17,6 +17,8 @@ const getAst = async ({
view?: View; view?: View;
}) => { }) => {
if (!model.columns?.length) await model.getColumns(); if (!model.columns?.length) await model.getColumns();
// extract only pk and pv
if (extractOnlyPrimaries) { if (extractOnlyPrimaries) {
return { return {
...(model.primaryKeys ...(model.primaryKeys
@ -71,7 +73,7 @@ const getAst = async ({
value = await getAst({ value = await getAst({
model, model,
query: query?.nested, query: query?.nested,
extractOnlyPrimaries: true extractOnlyPrimaries: nestedFields !== '*'
}); });
} }

Loading…
Cancel
Save