mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
[API] m2a filtering fix (#9666)
* [API] m2a filtering fix MySQL does not support CAST to VARCHAR type. * Use CHAR(255) instead of CHAR Co-authored-by: Oreille <33065839+Oreilles@users.noreply.github.com>
This commit is contained in:
@@ -223,7 +223,7 @@ export function applyFilter(
|
||||
.on(
|
||||
`${parentAlias || parentCollection}.${relation.field}`,
|
||||
'=',
|
||||
knex.raw(`CAST(?? AS VARCHAR(255))`, `${alias}.${schema.collections[pathScope].primary}`)
|
||||
knex.raw(`CAST(?? AS CHAR(255))`, `${alias}.${schema.collections[pathScope].primary}`)
|
||||
)
|
||||
.andOnVal(relation.meta!.one_collection_field!, '=', pathScope);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user