| Suggestion: commit() method returning the number of committed. [message #908540] |
Wed, 05 September 2012 10:44  |
Marvin Toll Messages: 20 Registered: July 2009 |
Junior Member |
|
|
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.
_Marvin
PatternEnabled.com
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06940 seconds