mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Fixed ambiguous column when field name exists in some join table (#4649)
This commit is contained in:
@@ -169,7 +169,10 @@ export function applyFilter(
|
||||
const pkField = `${collection}.${o2mRelation.one_primary}`;
|
||||
|
||||
dbQuery[logical].whereIn(pkField, (subQueryKnex) => {
|
||||
subQueryKnex.select([o2mRelation.many_field]).from(o2mRelation.many_collection);
|
||||
const field = o2mRelation.many_field
|
||||
const collection = o2mRelation.many_collection
|
||||
const column = `${collection}.${field}`
|
||||
subQueryKnex.select({[field]: column}).from(collection);
|
||||
|
||||
applyQuery(
|
||||
o2mRelation.many_collection,
|
||||
|
||||
Reference in New Issue
Block a user