Browse Source

fix: add missing field in nested gql hasmany relatiomnn

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/688/head
Pranav C 3 years ago
parent
commit
53de1159b7
  1. 10
      packages/nocodb/src/lib/dataMapper/lib/sql/BaseModelSql.ts

10
packages/nocodb/src/lib/dataMapper/lib/sql/BaseModelSql.ts

@ -1977,10 +1977,12 @@ class BaseModelSql extends BaseModel {
limit,
offset,
conditionGraph,
sort,
...restArgs
} = this._getChildListArgs(rest);
let { fields } = restArgs;
sort
// ...restArgs
} = this.dbModels[child]._getChildListArgs(rest);
// let { fields } = restArgs;
// todo: get only required fields
let fields = '*';
const { cn } = this.hasManyRelations.find(({ tn }) => tn === child) || {};

Loading…
Cancel
Save