I have simple query:
/* crm_person */
select /*query crm_person*/
crm_pers.*
from crm_person crm_pers
where 1=1
and crm_pers.id = ?
And params map:
As result I am getting error - org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = character varying Hint: No operator matches the given name and argument types. You might need to add explicit type casts. Position: 133
For me problem was groovy script, which set parameter id as string if not specified:
def params = utils.queries.params().put("id", personId).getMap()
so this helped:
def params = utils.queries.params().put("id", personId as Long).getMap()