title: How to convert List<Object> into comma separated String
body: <p>I am getting list of <code>Address</code> objects from the DB call. </p>
  
  <pre><code>ArrayList&lt;Address&gt; addresses = new ArrayList&lt;&gt;();
  </code></pre>
  
  <p>Each <code>Address</code> has an <code>int addressId</code> property.</p>
  
  <p>I am writing an update query where in the <code>IN</code> clause I am sending this whole list of <code>Address</code> objects and I am getting ibatis <code>TypeException</code>. How can I convert <code>List&lt;Address&gt;</code> to a comma separated string which can be sent to update query?</p>
  
  <p>My update query looks like:::</p>
  
  <pre><code>Update tablename set postcode = #{postCode} where id in #{addressID}.
  </code></pre>