Skip to content

Conversation

@scottnonnenberg
Copy link
Contributor

Added functionality and tests for afterDestroy error cases.

Also added tests for prevention of afterCreate and afterUpdate in error cases, both already implemented.

A thought: what if all of these afterXXX handlers were still called on error, but the model's errors field had been set? That would allow anything set up in beforeCreate to be cleaned up in afterCreate, even if an error happened.

Similar to afterCreate and afterUpdate, we don't want to run the afterXXXX handlers if the delete failed according to the adapter.
Added tests to ensure that the afterCreate/afterUpdate handlers are not run if the adapter returns an error.
anatoliychakkaev pushed a commit to anatoliychakkaev/jugglingdb that referenced this pull request Mar 31, 2013
@1602 1602 merged commit 5655e8f into 1602:master Mar 31, 2013
haegrr pushed a commit to minmb/jugglingdb that referenced this pull request May 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants