title: How do you write arrays to an Oracle 10g XE db using iBatis?
body: <p>I have looked for the answer to this high and low but cannot get the answer.</p>
  
  <p>Basically I have an object I am writing to my db using iBatis. This works fine with primitive types like strings, int's etc but one of the attributes of my object is an array of other objects. I would like to be able to persist this and then later call the 'selectById' statement and retrieve the full object including the array.</p>
  
  <p>Here is the code I have so far:</p>
  
  <p>Mapper.xml</p>
  
  <pre><code>  &lt;insert id="insertTrade" parameterClass="TradeObject"&gt;
  insert into TESTTABLE (
    ORDERID,
    MAXPX,
    COMMISSION,
    ACCOUNTGRP )
  values (
    #orderID#, #maxPx#, #commission#, #accountGrp#
  )
  </code></pre>
  
  <p></p>
  
  <p>accountGrp is my array but its currently throwing an error. The statement works fine without this field.</p>
  
  <p>The java is like so:</p>
  
  <pre><code>  public static void insertTrade (Trade obj) throws SQLException {
    logger.debug("inserting trade. Order Id: " + obj.toString());
  sqlMapper.insert("insertTrade", obj);
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks for any help in advance!!</p>