When you use JPA criteria API, the numeric value are not binded but are directly set in the SQL instead.
eq: you have a generated SQL like:
select ... from ... where age=12;
select ... from ... where age=?;
With '12' as parameter.
when you test the following code: