title: Pass multiple values in IN clause using mybatis annotations
body: <p>I am trying to pass multiple values in a SELECT QUERY consisting of an IN clause. I would like to execute the following query using mybatis:</p>
  
  <pre><code>SELECT * FROM DBA_COMPARISON_ROW_DIF WHERE SCAN_ID in  (#{childScanIDs})
  </code></pre>
  
  <p>where the <code>childScanIDs</code> variable consists of multiple comma separated values. I am passing these values as a String consisting of all the values separated with a comma. Below is the method being used in the mapper interface.</p>
  
  <pre><code>@Select(getDifferencesByScanIDs)
      @Results({
              @Result(property="owner", column="OWNER"),
              @Result(property="comparisonName", column="COMPARISON_NAME"),
              @Result(property="scanID", column="SCAN_ID"),
              @Result(property="localRowID", column="LOCAL_ROWID"),
              @Result(property="remoteRowID", column="REMOTE_ROWID"),
              @Result(property="indexValue", column="INDEX_VALUE"),
              @Result(property="status", column="STATUS"),
              @Result(property="lastUpdateTime", column="LAST_UPDATE_TIME")
      })
      List&lt;Difference&gt; getDifferencesByScanIDs(@Param("childScanIDs") String childScanIDs);
  </code></pre>
  
  <p>I am constructing the string of values this way: </p>
  
  <pre><code>String scanIDs = StringUtils.join(cmp.getChildScanIDs(), ",");
  </code></pre>
  
  <p>When executing the function, it is raising this exception.</p>
  
  <pre><code>### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
  
  ### The error may involve com.rs2.automation.soacomparison.dao.differences.DifferencesMapper.getDifferencesByScanIDs-Inline
  ### The error occurred while setting parameters
  ### Cause: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
  </code></pre>
  
  <p>Any help would be appreciated. I think the problem is that mybatis is not recognizing the values as separate numbers. Another solution would be to execute the query on each number but I wanted to pass all the values at once. 
  Thanks in advance. </p>