Browse Source

fix: if fields value specified as `*` extract all fields

re #1981

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/1984/head
Pranav C 3 years ago
parent
commit
454a686a58
  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;
}) => {
if (!model.columns?.length) await model.getColumns();
// extract only pk and pv
if (extractOnlyPrimaries) {
return {
...(model.primaryKeys
@ -71,7 +73,7 @@ const getAst = async ({
value = await getAst({
model,
query: query?.nested,
extractOnlyPrimaries: true
extractOnlyPrimaries: nestedFields !== '*'
});
}

Loading…
Cancel
Save