|Suggestion: commit() method returning the number of committed. [message #908540]
||Wed, 05 September 2012 14:44
| Marvin Toll
Registered: July 2009
It would be helpful to me... so I'm presuming others... to have a version of the commit() method similar to the following using the EntityTransaction interface as a model:|
* Commit the current resource transaction, writing any
* unflushed changes to the database. This version of the
* commit() method returns the number of SQL modification-
* related statements executed.
* @throws IllegalStateException if <code>isActive()</code> is false
* @throws RollbackException if the commit fails
public int commits();
Perhaps obviously, this method would have immediate benefit in a (JUnit style) testing context - where it is difficult to assert if an "update" actually was persisted to the database.
Powered by FUDForum
. Page generated in 0.02691 seconds