Browse Source

refactor: for xcdb make relation virtual

Signed-off-by: Pranav C <pranavxc@gmail.com>
test/reset-fail
Pranav C 2 years ago
parent
commit
d9bd216bae
  1. 5
      packages/nocodb/src/services/columns.service.ts

5
packages/nocodb/src/services/columns.service.ts

@ -1553,6 +1553,11 @@ export class ColumnsService {
childColumn = await Column.get({ colId: id }); childColumn = await Column.get({ colId: id });
// if xcdb base then treat as virtual relation to avoid creating foreign key
if (param.base.is_meta) {
(param.column as LinkToAnotherColumnReqType).virtual = true;
}
// ignore relation creation if virtual // ignore relation creation if virtual
if (!(param.column as LinkToAnotherColumnReqType).virtual) { if (!(param.column as LinkToAnotherColumnReqType).virtual) {
foreignKeyName = generateFkName(parent, child); foreignKeyName = generateFkName(parent, child);

Loading…
Cancel
Save