title: foreach for mybatis returns Null results
body: <p>My mapper xml is like this.</p>
  
  <pre><code>&lt;mapper namespace="EmployeeDaoMapper"&gt;
  &lt;resultMap id="employeeResultMap" type="Employee"&gt;
      &lt;result property="employeeName" column="name"/&gt;
      &lt;result property="employeeId" column="employee_id"/&gt;
  &lt;/resultMap&gt;
  
  
  &lt;select id="getEmployees" parameterType="list" resultMap="employeeResultMap"&gt;
  &lt;!--&lt;select id="getEmployees" resultType="Employee"&gt;--&gt;
      SELECT
      &lt;foreach item="item" index="index" collection="list" separator="," &gt;
          #{item}
      &lt;/foreach&gt;
      FROM employees
      WHERE LOWER (name) LIKE LOWER(#{searchQuery} +'%') OR
      LOWER(login) LIKE LOWER(#{searchQuery} +'%') OR
      LOWER( employee_id ) LIKE LOWER(#{searchQuery} + '%')
      LIMIT #{resultsLimit}
  
  &lt;/select&gt;
  </code></pre>
  
  <p>EmployeeMapper Interface</p>
  
  <pre><code>List&lt;Employee&gt; getEmployees(@Param("searchQuery") String searchQuery, @Param("resultsLimit") int
          resultsLimit, @Param("list") List&lt;String&gt; attributes);
  </code></pre>
  
  <p>query returns list of null.</p>
  
  <p>Instead of foreach, if i directly add column names then it works fine.</p>
  
  <p>I am not sure what mistake i am making. I checked query, it is building query correctly, still unable to fetch results.</p>