SoftwareBrothers / adminjs-sequelizejs

Sequelizejs adapter for AdminBro
MIT License
27 stars 34 forks source link

Using MySQL-incompatible ILIKE comparison #65

Closed fabiosantoscode closed 3 years ago

fabiosantoscode commented 3 years ago

Hey there!

I'm giving adminbro a try for the first time, and I'm loving it! However string filters aren't working. I dug a little deeper and found that it's using the ILIKE operator that's not present in MySQL.

Digging into the node_modules folder, and changing build/utils/convert-filter.js from Op.iLike to Op.like, fixes the crash (but doesn't perform a case insensitive search obviously).

Related: https://github.com/SoftwareBrothers/admin-bro-sequelizejs/issues/5

mmilleruva commented 3 years ago

I just ran in to the exact same issue.

MoonJR commented 3 years ago

I just ran in to the exact same issue.

dziraf commented 3 years ago

I'll update it tomorrow to use LIKE instead of ILIKE for all database types since that is what it's like in i. e. typeorm adapter. This will make the filter case sensitive though.

dziraf commented 3 years ago

The fix is included in the latest @admin-bro/sequelize@beta

popovoleksandr commented 2 years ago

Unfortunately, this fix is not being included to v2.0.0 (which is published to NPM) while was fixed on v1.3.0-beta.5. @dziraf is it possible to make either one: include this feature to published release or publish v1.3.0-Beta.5 to NPM, please?

lumayara commented 2 years ago

I am having the same problem still. Trying admin-bro and adminjs. Don't even know exactly which one I should be using but I tried both to see and am getting the same problem with filters.