I have in my controller:
$dataSource = $this->getDataSource(); // line 141
$dataSource->begin($this);
if(...){
$dataSource->commit($this);
}else{
$dataSource->rollback($this);
}
but not works, I get the following error:
Fatal error: Call to undefined method AppusuariosController::getDataSource() in C:...\app\controllers\appusuarios_controller.php on line 141
I have to import getDataSource() ?
I have found a solution, I hope it helps someone in the future http://www.amitrawat.com/2011/08/30/transaction-cakephp/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With