You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PG: operator does not exist: uuid ~~* unknown #709
Hello, I have an UUID column as ID column. When I do:
Campaign.search(id_cont: 'abc').result
I get this error:
HINT: No operator matches the given name and argument type(s).
You might need to add explicit type casts.
SELECT "campaigns".* FROM "campaigns" WHERE "campaigns"."pro_user_id" = $1
AND "campaigns"."aasm_state" = 'drafted'
AND ("campaigns"."id" ILIKE NULL)
ORDER BY "campaigns"."created_at" DESC
LIMIT 25
OFFSET 0
PG::UndefinedFunction: ERROR: operator does not exist: uuid ~~* unknown
LINE 1: ...s"."aasm_state" = 'drafted' AND ("campaigns"."id" ILIKE NULL...
same issue here. the IDs in the tables are not of type Integer, they are UUIDs. When passing the ids to ransacker, it tries to find the objects with 'ILIKE' method, instead of simple 'IN'
All you need to do then is include RansackUUIDHelper in your model.
Reacted by Kelly Morning, Oleg Nikitashin, Artan Sinani, Aleksey, Administrator, Eduardo Souza, Seva Baskin, Rodrigo Girão, thadeu, Łukasz Lapczyk and 4 more
Activity
jonatack commentedon Aug 8, 2016
Hello @zenati, to help people help you, could you provide a gist to reproduce your issue?
Please see CONTRIBUTING.md file for more information and a bug report template.
jonatack commentedon Aug 31, 2016
Stalled. Closing for now.
istvanfazakas commentedon Sep 6, 2016
same issue here. the IDs in the tables are not of type Integer, they are UUIDs. When passing the ids to ransacker, it tries to find the objects with 'ILIKE' method, instead of simple 'IN'
kkarski82 commentedon Apr 27, 2017
Here's a solution:
All you need to do then is
include RansackUUIDHelperin your model.