SoftwareBrothers / adminjs-sequelizejs

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

Cannot filter by uuid id: operator does not exist: uuid ~~* unknown #87

Closed Dima-Kevanishvili closed 2 years ago

Dima-Kevanishvili commented 2 years ago

This was originally https://github.com/SoftwareBrothers/adminjs/issues/932 . I was asked to create the issue here.

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:

  1. Go to a resource with uuid type primary key
  2. Try to filter the resource with said uuid primary key
  3. get the error

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%')

dziraf commented 2 years ago

this should be fixed now