Improve joined model update/delete.#71
Conversation
$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.
|
Current problem. $m->delete() and $m->save() rely on action('update') and Single-record save() and delete() are properly augmented by Join_SQL to ensure $m->save() invokes update with a fixed ID. Iit updates joined Action is more suited for all-set update and if you use joins with Same goes for deletion. With this PR Persistence_SQL will no longer use action for update/delete but will instead create a basic query. This solves prolbems:
(test-scripts for the above cases are not supplied) |
No description provided.