Use foreign key instead of parimary[0]
This commit is contained in:
parent
66c13a2a77
commit
d7ae20ce21
|
@ -127,10 +127,7 @@
|
|||
let fromPrimary
|
||||
$: {
|
||||
if (!fromPrimary && fromTable) {
|
||||
const relationshipKey = fromRelationship?.fieldName
|
||||
fromPrimary =
|
||||
fromTable.primary.filter(val => val === relationshipKey)[0] ||
|
||||
fromTable.primary[0]
|
||||
fromPrimary = fromRelationship?.foreignKey
|
||||
}
|
||||
}
|
||||
$: isManyToMany =
|
||||
|
|
Loading…
Reference in New Issue