diff --git a/workflow/engine/controllers/pmTablesProxy.php b/workflow/engine/controllers/pmTablesProxy.php index 5a112b30a..4d0b061af 100755 --- a/workflow/engine/controllers/pmTablesProxy.php +++ b/workflow/engine/controllers/pmTablesProxy.php @@ -549,31 +549,24 @@ class pmTablesProxy extends HttpProxyController eval('$obj = new ' .$this->className. '();'); if (count($row) > 0) { - try { - eval('$con = Propel::getConnection('.$this->classPeerName.'::DATABASE_NAME);'); - $con->begin(); - $obj->fromArray($row, BasePeer::TYPE_FIELDNAME); + eval('$con = Propel::getConnection('.$this->classPeerName.'::DATABASE_NAME);'); + $obj->fromArray($row, BasePeer::TYPE_FIELDNAME); - if ($obj->validate()) { - $obj->save(); - $toSave = true; - - $primaryKeysValues = array(); - foreach ($primaryKeys as $primaryKey) { - $method = 'get' . AdditionalTables::getPHPName($primaryKey['FLD_NAME']); - $primaryKeysValues[] = $obj->$method(); - } + if ($obj->validate()) { + $obj->save(); + $toSave = true; + + $primaryKeysValues = array(); + foreach ($primaryKeys as $primaryKey) { + $method = 'get' . AdditionalTables::getPHPName($primaryKey['FLD_NAME']); + $primaryKeysValues[] = $obj->$method(); } - else { - foreach($obj->getValidationFailures() as $objValidationFailure) { - $msg .= $objValidationFailure->getMessage() . "\n"; - } - throw new PropelException($msg); + } + else { + foreach($obj->getValidationFailures() as $objValidationFailure) { + $msg .= $objValidationFailure->getMessage() . "\n"; } - } - catch(Exception $e) { - $con->rollback(); - throw new Exception($e->getMessage()); + throw new PropelException($msg); } $index = G::encrypt(implode('-', $primaryKeysValues), 'pmtable'); }