Different types returned for production code (Oracle) and in integration tests (HSQLDB) #448
after upgrading from 2.3.1.to QueryDSL 3.1.1 (in 3.2.0 this also happens) I have type mismatch in query projection. Production code uses OracleTemplates and for a long value it returns BigDecimal in AbstractJPASQLQuery#getResultList, whereas in integration Junit tests that use HsqlDB the same column is mapped to BigInteger which results in error:
java.lang.IllegalArgumentException: argument type mismatch
I tried using the same template in JUnit tests (OracleTemplates instead of HSQLDBTemplates, but to no avail).
Because writing integration tests using HSQLDB is so common, it would be good if one could override HSQLDB custom types with the ones used in production environment.
select col1, col2, col3, ..
Then in AbstractJPASQLQuery#getResultList(Query query) I see that in the query.getResultList() method everywhere where in production code BigDecimal is returned, in HSQLDB integration test I get BigInteger instead.
The text was updated successfully, but these errors were encountered: