You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Rick <ri...@gmail.com> on 2009/08/23 23:20:30 UTC

clarification on docs pg 53 transaction control methods

pg 53 Tansaction Control Methods

"By default iBATIS does not actually commit unless it detects that the
database has been changed by a call to insert, update or delete. If
you’ve somehow made changes without calling these methods, then you
can pass true into the commit and rollback methods to guarantee that
it will be committed"

What would be an example of changes done 'without calling these
methods' where you might want to force a commit with true?  Are you
referring to an external manipulation of the row in question from
outside the app (ie manual update.)

I assume it won't hurt anything to always be safe and call
commit(true) on the inserts,updates, deletes ?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: clarification on docs pg 53 transaction control methods

Posted by Clinton Begin <cl...@gmail.com>.
A case would be something like a stored proc that does a bunch of stuff,
then returns a bunch of stuff... where some of that stuff includes updates.
If you call that with the  .selectList() method, then you'll want to call
commit(true).

It's rare, but happens.

Clinton

On Sun, Aug 23, 2009 at 3:20 PM, Rick <ri...@gmail.com> wrote:

> pg 53 Tansaction Control Methods
>
> "By default iBATIS does not actually commit unless it detects that the
> database has been changed by a call to insert, update or delete. If
> you’ve somehow made changes without calling these methods, then you
> can pass true into the commit and rollback methods to guarantee that
> it will be committed"
>
> What would be an example of changes done 'without calling these
> methods' where you might want to force a commit with true?  Are you
> referring to an external manipulation of the row in question from
> outside the app (ie manual update.)
>
> I assume it won't hurt anything to always be safe and call
> commit(true) on the inserts,updates, deletes ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>