we use in some queries the boolean values as integer/double values but now it throws Operand of * is of type 'java.lang.Boolean' which is not a numeric type. How should we resolve it? I think it is quite normal to use the boolean as 0/1 values.
This is not normal at all. You should use a case expression to produce the desired result instead e.g. case when entity.booleanAttribute then 1 else 0 end
Strict typing is there to prevent user errors. Maybe you mistyped your query with such implicit conversions, you’re going to potentially miss out on your error.
Just use casting or a case expression please. That will also make it clearer for readers.