Skip to content

Commit 983a6d2

Browse files
JanSmolkodziraf
authored andcommitted
fix: fix filter when snakecase mapper is used
1 parent 107943f commit 983a6d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/convert-filter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const convertFilter = (
3232
qb.where(path, operators.eq, value as string);
3333
} else if (property.type() === 'string') {
3434
// Should be safe: https://github.com/knex/documentation/issues/73#issuecomment-572482153
35-
qb.where(raw(`lower(${path})`), operators.like, `%${String(value).toLowerCase()}%`);
35+
qb.where(raw('lower(??)', [path]), operators.like, `%${String(value).toLowerCase()}%`);
3636
} else {
3737
qb.where(path, operators.eq, value as string);
3838
}

0 commit comments

Comments
 (0)