Using the relationship name rather than the table name - the relationship may have a different name to the related table, this makes it a bit more sensible.

This commit is contained in:
mike12345567 2024-07-01 15:48:49 +01:00
parent 7bd6615144
commit 3818b6d8cf
1 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,6 @@ import { BannedSearchTypes } from "../constants"
export function getTableFields(tables, linkField) {
const table = tables.find(table => table._id === linkField.tableId)
// TODO: mdrury - add support for this with SQS at some point
if (!table || !table.sql) {
return []
}
@ -11,7 +10,7 @@ export function getTableFields(tables, linkField) {
})
return linkFields.map(field => ({
...field,
name: `${table.name}.${field.name}`,
name: `${linkField.name}.${field.name}`,
}))
}