You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fox (JIRA)" <ji...@apache.org> on 2011/05/15 21:55:47 UTC

[jira] [Resolved] (TORQUE-119) Method "save" doesn't handle exceptions which results in unsavable objects

     [ https://issues.apache.org/jira/browse/TORQUE-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fox resolved TORQUE-119.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
         Assignee: Thomas Fox

> Method "save" doesn't handle exceptions which results in unsavable objects
> --------------------------------------------------------------------------
>
>                 Key: TORQUE-119
>                 URL: https://issues.apache.org/jira/browse/TORQUE-119
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.3
>            Reporter: Florian Liese
>            Assignee: Thomas Fox
>             Fix For: 4.0
>
>
> In the method "public void save(Connection con) throws TorqueException" (generated by templates>om>Object) the field "alreadyInSave" indicates that there is an ongoing save process. In the beginning it is set to "true", at the end it is set back to "false". But if an exception occurs (while calling doInsert(...) or doUpdate(...)) this field will not be set back to false 'cause the method throws this exception immediately. So afterwards it isn't possible to save an object using this method.
> proposal for fix:
> Wrap the "internal" of the save method with a "try { ... } finally { ... }" - statement and in the finally set the field "alreadyInSave" to false.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org