Should your resultClass be java.lang.Long instead of just "long" ?
On Wed, 2 Feb 2005 14:17:02 +0800, Gustavo Kuerten <[EMAIL PROTECTED]> wrote: > 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 >