code: @Override
      public void nullSafeSet(PreparedStatement preparedStatement, Object value, int i, SharedSessionContractImplementor sessionImplementor) throws HibernateException, SQLException {
          // use JDBC array type, which is fairly new, so tread carefully
          if (value == null) {
  			preparedStatement.setNull(i, java.sql.Types.ARRAY);
  		} else if(value instanceof Integer[]){
  		    Integer[] myArray = (Integer[]) value;
              Array inArray = preparedStatement.getConnection().createArrayOf("integer", myArray);
              preparedStatement.setArray(i, inArray);
  		} else if(value instanceof int[]) {
  			int[] myArray = (int[]) value;
              Array inArray = preparedStatement.getConnection().createArrayOf("integer", wrap(myArray));
  			preparedStatement.setArray(i, inArray);
  		} else {
  		    throw new IllegalArgumentException("Invalid type of input: " + value.getClass().getName());
  		}
docs: Supports both int[] and Integer[], yay!