|
|
@ -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 !== '*' |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|