title: How to select a java.util.List of objects using a mybatis resultMap association and select
body: <p>I have this almost working.</p>
  
  <pre><code>&lt;mapper namespace="com.xyz.rb.dao.RBCellDao"&gt;
      &lt;resultMap id="rbCellResultMap" type="com.xyz.rb.model.RBCell"&gt;
          &lt;id property="id" column="id" /&gt;
          &lt;result property="fieldIds" column="fieldIds" typeHandler="com.xyz.dao.typehandlers.CommaSeparatedLongListTypeHandler" /&gt;
          &lt;association property="fields" column="fieldIds" javaType="java.util.List" select="selectFields"&gt;&lt;/association&gt;
      &lt;/resultMap&gt;
  
      &lt;select id="selectFields" parameterType="String" resultType="com.xyz.abc.model.Field"&gt;
          SELECT * FROM fields WHERE id IN (#{value}) &lt;!-- this appears to get the correct value ====&gt; Parameters: 1,2,3(String) --&gt;
      &lt;/select&gt;
  &lt;/mapper&gt;
  </code></pre>
  
  <p>RBCell Table data looks like:  </p>
  
  <pre><code>| ID | FIELDIDS      |  
  |  1 | 1,2,3         | 
  |  2 | 45,54321,9,78 |
  </code></pre>
  
  <p>This is returning a List as expect, HOWEVER, there is only ever one entry in the List no matter what value is in the FieldIds column...</p>
  
  <p>What am I missing here?  How can I get this to return the entire list of Field instead of what appears to be only the first one?</p>