Closed Dima-Kevanishvili closed 2 years ago
This should be a matter of extending the if
on this line: https://github.com/SoftwareBrothers/adminjs-sequelizejs/blob/master/src/utils/convert-filter.ts#L18
if (property.sequelizePath.values) {
to
if (property.sequelizePath.values || property.isId()) {
and moving ...memo
above [property.name()]
. You can see if it worked by editing node_modules/@adminjs/sequelize/lib/utils/convert-filter.js
.
Can you open an issue in adminjs-sequelize
repository? https://github.com/SoftwareBrothers/adminjs-sequelizejs/issues
I'll close this one afterwards.
I'll also try to include a fix for this soon but I don't have a Sequelize+uuid project going at the moment so testing might take longer than actually fixing this
Done
Any updates? Same error in TypeORM here :)
It is still not resolved completely. I have updated the issue mentioned above
Describe the bug Trying to filter a resource by it's primary key(id) which has type of uuid. When entering a full uuid in filter input and pressing apply, I get an error message in console:
SequelizeDatabaseError: operator does not exist: uuid ~~* unknown
Installed libraries and their versions
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect for the filtering to work correctly and give me the needed object
Additional context Suspecting that this happens because the generate query has ILIKE operator in where clause for uuid
WHERE ("TABLE_NAME"."id" ILIKE '%3ad54072-c394-4020-b47e-c72dd29147a5%')