BUG 000 BUG 000 momentarily reverted to rc5 for pmTables (Win env compatibility
+ fixes for a unused transaction
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user