-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve joined model update/delete. (#71)
* Improve exception catching in Persistence_SQL * Use single-table update and single-table delete with where id=X $m->save() invokes update with a fixed ID. Also it updates joined tables separately. Because the record has been loaded successfully before and will be reloaded after updates (in some cases) at a risk of failed transaction, we don't have to invoke action here. Action is more suited for all-set update and if you use joins with SQLite you're on your own, as it does not support join with update. Same goes for deletion. * Remove commented out code. * Expanded documentation.
- Loading branch information
1 parent
80c8441
commit bfc16ee
Showing
3 changed files
with
60 additions
and
19 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
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