Open rlamorea opened 1 year ago
If I try a filtered URL like:
https://my.adminjs.server/admin/resources/myresource?filters.enumField=foo&filters.enumField=bar
The query only looks for WHERE enumField = 'foo'
WHERE enumField = 'foo'
This is because of line 16 in @adminjs/sequelize/lib/utils/convert-filter.js:
if (property.sequelizePath.values || uuidRegex.test(value.toString())) {
Since it is an enum field, this intercepts before it gets to the check for isArray and returns an Op.eq where clause instead of an Op.in clause.
isArray
Op.eq
Op.in
Note that this line would also prevent the selection of multiple UUIDs if I am reading it correctly.
If I try a filtered URL like:
The query only looks for
WHERE enumField = 'foo'
This is because of line 16 in @adminjs/sequelize/lib/utils/convert-filter.js:
Since it is an enum field, this intercepts before it gets to the check for
isArray
and returns anOp.eq
where clause instead of anOp.in
clause.