ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shardayyy" <sharda...@gmail.com>
Subject Oracle insert - selectKey problem
Date Sun, 19 Mar 2006 04:24:06 GMT
Hey folks, 

 

 

I am having a problem getting this to work. Any help would be appreciated.
What am trying to do is insert a person and return the Id that was used in
inserting the person.

 

Target Database is Oracle 9.2

iBatis Version 2.1.7 - Jan 21, 2006

 

 

 

    <insert id="savePerson"  parameterClass="PersonObject"
resultClass="int">
            <selectKey  property="personId" type="pre"  resultClass="int">

                   select SEQ_PERSON.nextval as seqId from dual

          </selectKey>

        INSERT INTO PERSON_TBL ( personId, name, age,gender) VALUES
(#seqId#, #name#, #age#, #gender#)

    </insert>  

 

Error message is:

 

 

 


Mime
View raw message