mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Always cast M2A related primary keys to text. (#9122)
This commit is contained in:
@@ -195,7 +195,7 @@ export function applyFilter(
|
||||
.on(
|
||||
`${parentAlias || parentCollection}.${relation.field}`,
|
||||
'=',
|
||||
`${alias}.${schema.collections[pathScope].primary}`
|
||||
knex.raw(`CAST(?? AS TEXT)`, `${alias}.${schema.collections[pathScope].primary}`)
|
||||
)
|
||||
.andOnVal(relation.meta!.one_collection_field!, '=', pathScope);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user