ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: problem with Selectkey
Date Wed, 04 May 2005 02:58:49 GMT
Yes, currently, only one selectKey is allowed in an insert.

Larry


On 5/3/05, GDUHAMEL@cofidis.fr <GDUHAMEL@cofidis.fr> wrote:
> 
> 
> Hi, 
> 
> I have to insert a new record using 2 sequences values (oracle). 
> So my code is : 
> 
> <insert id="INSERT_SESSION_HTTP_COOKIE" parameterClass="
> mypackage.commun.dataobject.DoSessionHttp"> 
> <selectKey resultClass="int" keyProperty="codesession"> 
> select SQ_CODE_SESSION.nextval AS CODESESSION from dual 
> </selectKey> 
> <selectKey resultClass="string" keyProperty="codecookie"> 
> select SQ_CODE_COOKIE.nextval AS CODECOOKIE from dual 
> </selectKey> 
> insert into SESSION_HTTP (codeSession, codeCookie, numClient) 
> values (#codesession#, #codecookie#, #numclient#) 
> </insert>
>  
> But the problem is that the second selectkey isn't executing. Why ? Is it 
> a limitation of ibatis ? 
> 
> How can i solve my problem ? 
> 
> Thanks for your help. 
> 
> G.D.

Mime
View raw message