Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a transaction context to 'save()' API in order to rollback possible modifications done in some 'Model.beforeSave' listener callback. This will allow cakephp 2.x to behave like 3.0 . It uses try/catch to better handle transaction. Previous save() API is renamed to protected _doSave() method. A new save() method is created for transaction handling. 'atomic' option is disabled for internal 'save()' call.
- Loading branch information
Showing
2 changed files
with
306 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters