Fix relationship conflicts
This commit is contained in:
parent
dfb5c1d717
commit
4e8e725b4b
|
@ -1 +1 @@
|
||||||
Subproject commit 42ad279dd750ac977f5ab9778487e722fea973b4
|
Subproject commit 3d037429b09281ed499d91a39fcacb0dd4e27c74
|
|
@ -74,7 +74,12 @@ async function generateTablesDelegate(data: ai.GenerationStructure) {
|
||||||
schema: {
|
schema: {
|
||||||
...storedTable.schema,
|
...storedTable.schema,
|
||||||
...table.schema.reduce<TableSchema>((acc, field) => {
|
...table.schema.reduce<TableSchema>((acc, field) => {
|
||||||
|
if (field.type === FieldType.LINK) {
|
||||||
|
const { reverseFieldName, relationshipId, ...rest } = field
|
||||||
|
acc[field.name] = { ...rest, fieldName: reverseFieldName }
|
||||||
|
} else {
|
||||||
acc[field.name] = field
|
acc[field.name] = field
|
||||||
|
}
|
||||||
return acc
|
return acc
|
||||||
}, {}),
|
}, {}),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue