Final fix - making sure relationships can be built from table UI.

This commit is contained in:
mike12345567 2023-02-02 17:37:41 +00:00
parent 01edfba90e
commit 90c2e69efe
1 changed files with 2 additions and 5 deletions

View File

@ -48,11 +48,7 @@
) )
let errors = {} let errors = {}
let fromPrimary, fromForeign, fromColumn, toColumn let fromPrimary, fromForeign, fromColumn, toColumn
let fromId = selectedFromTable?._id, let fromId, toId, throughId, throughToKey, throughFromKey
toId,
throughId,
throughToKey,
throughFromKey
let isManyToMany, isManyToOne, relationshipType let isManyToMany, isManyToOne, relationshipType
let hasValidated = false let hasValidated = false
@ -316,6 +312,7 @@
relationshipType = relationshipType =
fromRelationship.relationshipType || RelationshipTypes.MANY_TO_ONE fromRelationship.relationshipType || RelationshipTypes.MANY_TO_ONE
if (selectedFromTable) { if (selectedFromTable) {
fromId = selectedFromTable._id
fromColumn = selectedFromTable.name fromColumn = selectedFromTable.name
fromPrimary = selectedFromTable?.primary[0] || null fromPrimary = selectedFromTable?.primary[0] || null
} }