Quick fix for ambiguous column names _id.
This commit is contained in:
parent
394fa2536c
commit
6b7a4f07cb
|
@ -399,8 +399,12 @@ class InternalBuilder {
|
||||||
|
|
||||||
// when searching internal tables make sure long looking for rows
|
// when searching internal tables make sure long looking for rows
|
||||||
if (filters.documentType && !isExternalTable(table)) {
|
if (filters.documentType && !isExternalTable(table)) {
|
||||||
|
const tableRef = opts?.aliases?.[table._id!] || table._id
|
||||||
// has to be its own option, must always be AND onto the search
|
// has to be its own option, must always be AND onto the search
|
||||||
query.andWhereLike("_id", `${prefixed(filters.documentType)}%`)
|
query.andWhereLike(
|
||||||
|
`${tableRef}._id`,
|
||||||
|
`${prefixed(filters.documentType)}%`
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return query
|
return query
|
||||||
|
|
Loading…
Reference in New Issue