ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuvraj Shinde" <Yuvraj.Shi...@sos.sungard.com>
Subject RE: insert always returning null (urgent )
Date Fri, 21 Sep 2007 16:09:34 GMT
How to use a selectKey In insert ?

-----Original Message-----
From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf
Of Larry Meadors
Sent: Friday, September 21, 2007 9:36 PM
To: user-java@ibatis.apache.org
Subject: Re: insert always returning null (urgent )

The insert method does not return the inserted object, it returns the
result of your selectKey element.

If you don't use a selectKey element, insert will return null.

Larry


On 9/21/07, Yuvraj Shinde <Yuvraj.Shinde@sos.sungard.com> wrote:
>
>
>
>
> Hi all
>
>
>
>  I am using insert query. it is always returning a null value. how to
get
> the value of inserted object?
>
>
>
>  Following is mine insert statement
>
>
>
>   <insert id="LIMNAME_INSERT"
>
parameterClass="com.sungard.energy.zainet.shared.business.domain.Limname
DTO"
> >
>
>     insert into LIMNAME (AUDIT_ACTIVE, AUDIT_AGEN, AUDIT_AOP0,
AUDIT_ADATE0,
> AUDIT_ATIME0,
>
>       AUDIT_AOP1, AUDIT_ADATE1, AUDIT_ATIME1, AUDIT_ALF, AUDIT_AOHM,
> AUDIT_ROHM, AUDIT_REFRESH,
>
>       AUDIT_ZKEY, AUDIT_XKEY, AUDIT_UTIL1, AUDIT_UTIL2, LIMNAME_NAME,
> LIMNAME_DSC, LIMNAME_FILTER,
>
>       LIMNAME_FILTERA, LIMNAME_FILTERB, LIMNAME_FILTERC,
LIMNAME_RUNVIEW)
>
>     values (#active:DECIMAL#, #agen:DECIMAL#, #aop0:CHAR#,
> #adate0:TIMESTAMP#,
>
>       #atime0:DECIMAL#, #aop1:CHAR#, #adate1:TIMESTAMP#,
#atime1:DECIMAL#,
>
>       #alf:TIMESTAMP#, #aohm:TIMESTAMP#, #rohm:TIMESTAMP#,
> #refresh:DECIMAL#,
>
>       #zkey:DECIMAL#, #xkey:DECIMAL#, #util1:DECIMAL#,
#util2:DECIMAL#,
>
>       #limnameName:VARCHAR#, #limnameDsc:VARCHAR#,
#limnameFilter:VARCHAR#,
>
>       #limnameFiltera:VARCHAR#, #limnameFilterb:VARCHAR#,
> #limnameFilterc:VARCHAR#,
>
>       #limnameRunview:CHAR#)
>
>   </insert>
>
>
>
>
>  Regards
>
>  Yuvraj
>
> Yuvraj Shinde * Senior Software Engineer -  Zainet*  SunGard *
Offshore
> Services * Pride Portal,CTS No 103A/5A/1A/1B Bhamburda,Senapati Bapat
Road,
> shivajinagar,Pune 411016 Tel Direct +91 20 66248045 * Main +91 20
66248000 *
> Fax +91 20  25606222 yuvraj.shinde@sos.sungard.com * www.sungard.com
>
>
>
>



Mime
View raw message