The solution offered by Larry 
http://www.mail-archive.com/ibatis-user-java@incubator.apache.org/msg00673.html
does not work in my case. Anyone can offer any other insights on the
problem ? In my case, my id is mapped to a BIGINT in the mysql
database and is represented as a Long in the Java object. Is this
mapping correct ?

  <insert id="insertCurrency" parameterClass="currency"> 
    insert into CURRENCY (VERSION, CURRENCY_CODE, COUNTRY) 
    values(NOW(), #currencyCode#, #country#)
      <selectKey resultClass="long" keyProperty="id">
        SELECT LAST_INSERT_ID()
      </selectKey>    
  </insert>

Thanks

R

Reply via email to