Browse Source

fix: set alias for subquery

pull/6987/head
Pranav C 1 year ago
parent
commit
37fa7c03ec
  1. 2
      packages/nocodb/src/db/generateLookupSelectQuery.ts

2
packages/nocodb/src/db/generateLookupSelectQuery.ts

@ -309,7 +309,7 @@ export default async function generateLookupSelectQuery({
return {
builder: knex
.select(knex.raw('json_agg(??)::text', [lookupColumn.title]))
.from(selectQb),
.from(selectQb.as(subQueryAlias)),
};
/*
// alternate approach with array_agg

Loading…
Cancel
Save