Query {SELECT p.*, c.content AS pm_instructions, c.last_updated AS cache_update FROM "projects" p LEFT JOIN "cache" c ON c.topic = p.project_id AND c.type = 'msg' WHERE p.project_id = ?} with params {0} Failed! (ERROR: operator does not exist: character varying = integer LINE 3: ... LEFT JOIN "cache" c ON c.topic = p.projec... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.)