Guy,
Using the 212 build that function returns a void and not an integer and
will not compile.
Thanks for the thought, any other places we might look?
-- Chris Olsen
Guy Rouillier-2 wrote:
>
> On 12/10/2009 11:51 AM, Chris Olsen wrote:
>>
>> Using the V3 Annotations and session.GetMapper trying to figure out if
>> there
>> is a way to figure out how many rows were updated. I have seen some
>> other
>> posts that reference a way using some of the other methods but I can not
>> find any docs for the Annotations methods or docs for the API's. Any
>> pointers greatly appreciated.
>
> The update methods (insert, update and delete) return a rowcount. So use
>
> int rowsUpdated = mapper.updateScript(script);
>
>>
>> Thanks - Chris Olsen
>>
>> Sample code:
>> try {
>> session = sqlMapper.openSession();
>> final ScriptMapper mapper =
>> session.getMapper(ScriptMapper.class);
>> mapper.updateScript(script);
>> session.commit();
>> } catch(IbatisException ex) {
>> logger.log(Level.WARNING, "Unable to update script entry: "
>> +
>> script.getId(), ex);
>> }
>> finally {
>> if (session != null ) {
>> session.close();
>> }
>> }
>
>
> --
> Guy Rouillier
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://old.nabble.com/Ibatis-3-Annotaion---Get---Rows-updated-tp26730660p26733292.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]