Comment to explain the behaviour of the junction document select.
This commit is contained in:
parent
92e791f9a7
commit
889197679e
|
@ -121,6 +121,12 @@ async function buildInternalFieldList(
|
||||||
if (!relatedTable) {
|
if (!relatedTable) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
// a quirk of how junction documents work in Budibase, refer to the "LinkDocument" type to see the full
|
||||||
|
// structure - essentially all relationships between two tables will be inserted into a single "table"
|
||||||
|
// we don't use an independent junction table ID for each separate relationship between two tables. For
|
||||||
|
// example if we have table A and B, with two relationships between them, all the junction documents will
|
||||||
|
// end up in the same junction table ID. We need to retrieve the field name property of the junction documents
|
||||||
|
// as part of the relationship to tell us which relationship column the junction is related to.
|
||||||
const relatedFields = (
|
const relatedFields = (
|
||||||
await buildInternalFieldList(relatedTable, tables)
|
await buildInternalFieldList(relatedTable, tables)
|
||||||
).concat(
|
).concat(
|
||||||
|
|
Loading…
Reference in New Issue