Repository navigation
fix(model): skip commit callbacks when callbacks = false - #4378
Merged
Merged
Conversation
save(callbacks = false) and delete(callbacks = false) skipped every other callback but still queued afterCommit / afterRollback. They now skip those too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com>
…lse-after-commit Signed-off-by: Peter Amiri <peter@alurium.com> # Conflicts: # vendor/wheels/model/create.cfm
…e rolls back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com>
Collaborator
Author
Review @ 7d225d3: source looks good. Final verdict after matrix 37344694616 and PR CI
INFO (wording): the fragment's last sentence, "A save that changes nothing still queues No findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com>
Contributor
Wheels Test Results224 212 tests 219 091 ✅ 1h 26m 19s ⏱️ Results for commit 7d225d3. |
Collaborator
Author
|
FINAL: APPROVE. Head c1c50b8.
|
This was referenced Oct 5, 2026
bpamiri
added a commit
that referenced
this pull request
Oct 5, 2026
…de (#4386) * docs: note bulk-write transactions and callbacks=false in the app guide insertAll() / upsertAll() now run a call's batches in one transaction (#4367), and save()/delete() with callbacks=false skip afterCommit and afterRollback (#4378). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com> * docs: name invokeWithTransaction(), not a transaction() helper There is no transaction() function. Say where a bulk call joins an open transaction, and that its default comes from transactionMode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com> --------- Signed-off-by: Peter Amiri <peter@alurium.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
callbacks = falsealso skips the commit callbackssave(callbacks = false)anddelete(callbacks = false)skipped every callback exceptafterCommitandafterRollback, which they still queued. They now skip those too.$enqueueTransactionCallbacks()takes acallbacksargument. Withcallbacks = falseit queues only the saved-change restore, the same path a model without commit callbacks already takes. Acallbacks = falsesave that rolls back therefore still puts back whatsavedChanges()reported before it.A save that changes nothing still queues
afterCommit, as before.Specs
vendor/wheels/tests/specs/model/callbacksFalseAfterCommitSpec.cfc, on thetagmodel withafterCommitandafterRollbackregistered:callbacks = false: no commit callback runs;callbacks = false: noafterRollback;callbacks = falsesave:savedChanges()equals its value from before the save;callbacks = true: they run, as before.RED on develop: the four
callbacks = falsecases fail. ThesavedChanges()case was checked against a version that skipped the queue entirely, and it fails there.GREEN, Lucee 7 + SQLite: full suite 6852/6852 after merging develop; complexity gate passes.
🤖 Generated with Claude Code