No operator matches the given name and argument types. You might need to add explicit type casts

I just created a new project for a Rails app, and it worked for most of the collections, (Orders, Products) except Line Items, where I get this error:

Records Index error: PG::UndefinedFunction: ERROR: operator does not exist: bigint = character varying
LINE 1: …order_id" LEFT OUTER JOIN “foods” ON “foods”.“id” = "line_it…

I do have a column there “cart_id” that is null.


Great product, thanks!


Hi @piclez :wave: welcome to our community!
I need more informations to try to reproduce your issue and try to fix it.

Can you share the model definition which causes problems?
And explain what kind of action do you try to execute?