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. '();');
|
eval('$obj = new ' .$this->className. '();');
|
||||||
|
|
||||||
if (count($row) > 0) {
|
if (count($row) > 0) {
|
||||||
try {
|
eval('$con = Propel::getConnection('.$this->classPeerName.'::DATABASE_NAME);');
|
||||||
eval('$con = Propel::getConnection('.$this->classPeerName.'::DATABASE_NAME);');
|
$obj->fromArray($row, BasePeer::TYPE_FIELDNAME);
|
||||||
$con->begin();
|
|
||||||
$obj->fromArray($row, BasePeer::TYPE_FIELDNAME);
|
|
||||||
|
|
||||||
if ($obj->validate()) {
|
if ($obj->validate()) {
|
||||||
$obj->save();
|
$obj->save();
|
||||||
$toSave = true;
|
$toSave = true;
|
||||||
|
|
||||||
$primaryKeysValues = array();
|
$primaryKeysValues = array();
|
||||||
foreach ($primaryKeys as $primaryKey) {
|
foreach ($primaryKeys as $primaryKey) {
|
||||||
$method = 'get' . AdditionalTables::getPHPName($primaryKey['FLD_NAME']);
|
$method = 'get' . AdditionalTables::getPHPName($primaryKey['FLD_NAME']);
|
||||||
$primaryKeysValues[] = $obj->$method();
|
$primaryKeysValues[] = $obj->$method();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
foreach($obj->getValidationFailures() as $objValidationFailure) {
|
else {
|
||||||
$msg .= $objValidationFailure->getMessage() . "\n";
|
foreach($obj->getValidationFailures() as $objValidationFailure) {
|
||||||
}
|
$msg .= $objValidationFailure->getMessage() . "\n";
|
||||||
throw new PropelException($msg);
|
|
||||||
}
|
}
|
||||||
}
|
throw new PropelException($msg);
|
||||||
catch(Exception $e) {
|
|
||||||
$con->rollback();
|
|
||||||
throw new Exception($e->getMessage());
|
|
||||||
}
|
}
|
||||||
$index = G::encrypt(implode('-', $primaryKeysValues), 'pmtable');
|
$index = G::encrypt(implode('-', $primaryKeysValues), 'pmtable');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user