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: {
|
||||
...storedTable.schema,
|
||||
...table.schema.reduce<TableSchema>((acc, field) => {
|
||||
acc[field.name] = field
|
||||
if (field.type === FieldType.LINK) {
|
||||
const { reverseFieldName, relationshipId, ...rest } = field
|
||||
acc[field.name] = { ...rest, fieldName: reverseFieldName }
|
||||
} else {
|
||||
acc[field.name] = field
|
||||
}
|
||||
return acc
|
||||
}, {}),
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue