Allow primary keys to be foreign key
This commit is contained in:
parent
8684529f19
commit
d10dfc1e28
|
@ -340,9 +340,7 @@
|
||||||
{:else if isManyToOne && toTable}
|
{:else if isManyToOne && toTable}
|
||||||
<Select
|
<Select
|
||||||
label={`Foreign Key (${toTable?.name})`}
|
label={`Foreign Key (${toTable?.name})`}
|
||||||
options={Object.keys(toTable?.schema).filter(
|
options={Object.keys(toTable?.schema)}
|
||||||
field => toTable?.primary.indexOf(field) === -1
|
|
||||||
)}
|
|
||||||
on:change={() => ($touched.foreign = true)}
|
on:change={() => ($touched.foreign = true)}
|
||||||
bind:error={errors.foreign}
|
bind:error={errors.foreign}
|
||||||
bind:value={fromRelationship.fieldName}
|
bind:value={fromRelationship.fieldName}
|
||||||
|
|
Loading…
Reference in New Issue