The issue is that Oracle doesn't have a true bool type but PostgreSQL does. As a result:
SELECT true = '1';
Returns 't' for true
SELECT true = 1;
Produces the error you are experiencing. If you can change your persistence to compare with a quoted (i.e. unknown) type, that will solve the problem.
If you can't do that, you can create a custom operator:
CREATE OR REPLACE FUNCTION comp_bool(bool, int) RETURNS bool LANGUAGE SQL AS
$$
SELECT $1 = $2::bool;
$$;
CREATE OR REPLACE FUNCTION comp_bool(int, bool) RETURNS bool LANGUAGE SQL AS
$$
SELECT $1::bool = $2;
$$;
CREATE OPERATOR = (
procedure = comp_bool,
leftarg = bool,
rightarg = int,
commutator = =
);
CREATE OPERATOR = (
procedure = comp_bool,
leftarg = int,
rightarg = bool,
commutator = =
);
Then
SELECT true = 1;
works.....