From 3cb653eb0146e32a676d488654b8436ae03ad391 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 5 Nov 2024 11:54:09 +0100 Subject: [PATCH] Fix initial setup --- .../backend/Datasources/CreateEditRelationship.svelte | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte index 8a0bcce91e..7e11c98768 100644 --- a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte +++ b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte @@ -370,6 +370,16 @@ fromColumn = selectedFromTable.name fromPrimary = selectedFromTable?.primary[0] || null } + if (relationshipType === RelationshipType.MANY_TO_MANY) { + relationshipPart1 = PrettyRelationshipDefinitions.MANY + relationshipPart2 = PrettyRelationshipDefinitions.MANY + } else if (relationshipType === RelationshipType.MANY_TO_ONE) { + relationshipPart1 = PrettyRelationshipDefinitions.ONE + relationshipPart2 = PrettyRelationshipDefinitions.MANY + } else { + relationshipPart1 = PrettyRelationshipDefinitions.MANY + relationshipPart2 = PrettyRelationshipDefinitions.ONE + } })