Require only visible fields on views
This commit is contained in:
parent
e2ec75ff40
commit
76b0a96b73
|
@ -150,10 +150,19 @@ export async function buildSqlFieldList(
|
||||||
table = source
|
table = source
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let field of Object.values(table.schema)) {
|
for (const field of Object.values(table.schema)) {
|
||||||
if (field.type !== FieldType.LINK || !relationships || !field.tableId) {
|
if (field.type !== FieldType.LINK || !relationships || !field.tableId) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
isView &&
|
||||||
|
source.schema?.[field.name] &&
|
||||||
|
!helpers.views.isVisible(source.schema[field.name])
|
||||||
|
) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
const { tableName } = breakExternalTableId(field.tableId)
|
const { tableName } = breakExternalTableId(field.tableId)
|
||||||
if (tables[tableName]) {
|
if (tables[tableName]) {
|
||||||
fields = fields.concat(extractRealFields(tables[tableName], fields))
|
fields = fields.concat(extractRealFields(tables[tableName], fields))
|
||||||
|
|
Loading…
Reference in New Issue