phalcon/cphalcon — pull request #694 by cnwggu (2013-06-07 08:55:51+00:00)
Title: add cross-db transaction support 1.2.0

You can do cross-db transactions now:
```php
$manager = new \Phalcon\Mvc\Model\Transaction\Manager();

$manager->setDbService("vs_hotel");
$tran1 = $manager->get();

$manager->setDbService("vs_common");
$tran2 = $manager->get();

$pointModel = new PointModel();
$pointModel->setTransaction($tran2);
$pointModel->name = "ttt";
$pointModel->position = "[122, 3432]";
$pointModel->city_id = 323;
$pointModel->city_py = "hello";

if($pointModel->save() == false) {
foreach($pointModel->getMessages() as $message) {
echo $message->__toString() . PHP_EOL;
}
$manager->rollback();
}

$eqsModel = new EQSModel();
$eqsModel->setTransaction($tran1);
$eqsModel->out_id = "343";
$eqsModel->entity_id = 3343;
$eqsModel->vendors = "[fdfd]";

if($eqsModel->save() == false) {
foreach($eqsModel->getMessages() as $message) {
echo $message->__toString() . PHP_EOL;
}
echo "=====---eqs rollback---======\n";
$manager->rollback();
}
$manager->commit();
```