Try to match primary key or take first
This commit is contained in:
parent
5477cf420a
commit
66c13a2a77
|
@ -127,7 +127,10 @@
|
|||
let fromPrimary
|
||||
$: {
|
||||
if (!fromPrimary && fromTable) {
|
||||
fromPrimary = fromTable.primary[0]
|
||||
const relationshipKey = fromRelationship?.fieldName
|
||||
fromPrimary =
|
||||
fromTable.primary.filter(val => val === relationshipKey)[0] ||
|
||||
fromTable.primary[0]
|
||||
}
|
||||
}
|
||||
$: isManyToMany =
|
||||
|
|
Loading…
Reference in New Issue