ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sundar Sankar <fatboys...@gmail.com>
Subject Re: What does Insert method return
Date Thu, 12 Feb 2009 16:12:23 GMT
Hi Rahul
check this website out
http://ibatis.apache.org/docs/java/user/com/ibatis/sqlmap/client/SqlMapClient.html
.
It seems to say that it will return the number of rows inserted.

Though I understand you have no test bed but I would still suggest you some
how test it with a rollback enabled and see if the actual object or any
other variety results do come back. I am not sure if you have spring in you
app, But if you do, enabling a unit test is a piece of cake in Spring 2.5 +

-Sundar

On Thu, Feb 12, 2009 at 8:25 AM, Rahul Saluja <rahul.saluja@vnl.in> wrote:

>  Hello Everyone,
>
>
>
> Can anyone tell me what exactly does sqlmapclient.insert method return I
> know it returns an object but does it returns the object of selectkey means
> say in following example
>
>
>
> <selectKey keyProperty="generatedSequenceId_0" resultClass="int">
>
>       SELECT currval('MSCPerfCntrTrunk_seq')
>
>     </selectKey>
>
>
>
> Does it return an Integer Object containing an sequence value generated by
> my insert statement
>
> or
>
>
>
> does it return the actual Object which was just inserted with the  generatedSequenceId_0
> field assigned the generated sequence number.
>
>
>
>
>
> Eagerly Looking forward to your response.
>
>
>
> Regards
>
> Rahul Saluja
>
> The information contained in this e-mail is private & confidential and may also be
legally privileged. If you are not the intended recipient, please notify us, preferably by
e-mail, and do not read, copy or disclose the contents of this message to anyone.
>
>

Mime
View raw message