@Override
    public BigDecimal getValue(ResultSet rs, int startIndex) throws SQLException {
        double val = rs.getDouble(startIndex);
        return rs.wasNull() ? null : BigDecimal.valueOf(val);
    }
{@code BigDecimalAsDoubleType} maps BigDecimal to Double on the JDBC level

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/types/BigDecimalAsDoubleType.java