Lifecycle side effects: Lifecycle hook: insertupdate record in another table
Cross-table data effects from lifecycle hooks (upsert / increment a related row as a side effect of create/update/delete).
Originally scoped for chores :scores counters. That fitness case is better served by filtered rollups (see MVP Now). Keep this item for non-derivable workflows: append-only history, create-invoice-on- approve, quotas with external inputs, audit lines, etc.
Depends on the lifecycle data-effect contract (done: same-type plist merge on pre-create/pre-update). Cross-table writes still need:
- backend identity-keyed find + insert-or-update primitive (factor from
execute-write-towhere useful) - curated registry lifecycle hook(s), not raw SQL
- post-* attachment; pass
:recordon post-update for transitions - compile-time validation of target type / keys
- best-effort failure policy until transactions land
Write-through remains the field-level "set this related value" tool; do not overload :write-to for increments or multi-column events.
- Slot
- 13500
- Status
- 10 Open
- Tags
- backend, compiler
- Contributors
- Donnie