private static void copy(Object source, Object target, int length) {
        // Note: System.arrayCopy doesn't handle copying from/to primitive arrays properly
        for (int i = 0; i < length; i++) {
            Object val = java.lang.reflect.Array.get(source, i);
            java.lang.reflect.Array.set(target, i, val);
        }
    }
{@code ArrayType} maps Java arrays to JDBC arrays

@param <T>
querydsl-sql/src/main/java/com/querydsl/sql/types/ArrayType.java