ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <lmead...@apache.org>
Subject Re: the return result of insert, update, and delete in SqlMapClient API
Date Tue, 13 Dec 2005 14:34:21 GMT
The Dev guide is wrong.

It returns the results of selectKey...

Larry


On 12/13/05, Meindert <meindert@pastelebusiness.com> wrote:
>
>
>
> >Uhm, insert() does not return an int.
> According to the Developer Guide (page 43) it does.
> The javadoc say's that it returns a java.lang.Object containing the primary
> key, the primary key field is defined with the <selectKey> tag in the Sql.
>
> Meindert
>
> >Larry
>
>
> On 12/13/05, Leonardo Kenji Shikida <shikida@gmail.com> wrote:
> > I believe it means the number of affected rows (just like jdbc)
> >
> > On 12/13/05, John Chien <john.chien@ncmail.net> wrote:
> > > The SqlMapClient API indicates:
> > >
> > > public int insert(String statementName, Object parameterObject) throws
> > > SQLException.
> > > public int update(String statementName, Object parameterObject) throws
> > > SQLException
> > > public int delete(String statementName, Object parameterObject) throws
> > > SQLException
> > >
> > > what does the return int repesent ?
> > >
> > > the example shows
> > >
> > > int rows = sqlMap.insert("insertProduct", product);
> > >
> > > Does the return int represent the number of rows being inserted, updated
> > > or deleted ?
> > >
> > > Is there anyway of returning the Object or the List of the rows being
> > > inserted, updated or deleted ?
> > >
> > >
> > > Thanks,
> > >
> > > John Chien
> > >
> > >
> > >
> >
> >
> > --
> >
> > []
> >
> > Kenji
> > _______________________
> > http://kenjiria.blogspot.com
> > http://gaitabh.blogspot.com
> >
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.13.13/195 - Release Date: 08/12/2005
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.13.13/195 - Release Date: 08/12/2005
>
>
>

Mime
View raw message