Description
When executing a SQL statement with some prepared statement replacement types (short, double ...) on the current trunk version, postgresql fails with an error, e.g. ERROR: operator does not exist: smallint = character varying
This error is caught by the test org.apache.torque.generated.peer.RetrieveByPkTest.testRetrieveByNonExistingPkMultiplePKs() in the test project.
The reason is that in org.apache.torque.util.BasePeerImpl.setPreparedStatementReplacements(PreparedStatement, List<Object>, int) in the runtime, not all of these arguments are considered, and for unknown arguments, java.sql.PreparedStatement.setString(int, String) is used.
The setPreparedStatementReplacements method should be changed such that also the specific setters for short, byte, float and double are used.