Skip to content

docs(intent): deleting a payment gives its allocation back (#7061) - #228

Merged
delchev merged 1 commit into
masterfrom
intent/settlement-payment-delete
Sep 6, 2026
Merged

docs(intent): deleting a payment gives its allocation back (#7061)#228
delchev merged 1 commit into
masterfrom
intent/settlement-payment-delete

Conversation

@delchev

@delchev delchev commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Companion to eclipse-dirigible/dirigible#7064.

The settlements section of the DSL reference described the spread handler as bound to the payment's create and its update. The platform now binds its delete as well: a further handler removes every junction row of the deleted payment through the junction repository, so the paid roll-up recomputes and the invoice relinquishes PAID / PARTIAL exactly as when an allocation row is deleted by hand.

The paragraph also records why nothing else could do it - a foreign key never becomes a database constraint on this platform, so there is no cascade, and a cross-model payment's owner knows nothing of the settlement and does not own the junction rows - which is the failure the rows caused: they outlived the payment as orphans and the invoice stayed settled forever.

npm run docs:build: clean.

The settlements reference said the spread handler is bound to the payment's
create and its update; the platform now also binds its delete, removing the
payment's junction rows so the paid roll-up recomputes and the invoice
relinquishes PAID. Records why nothing else could do it: no FK cascade, and
a cross-model payment's owner does not own the junction rows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@delchev
delchev merged commit 7e6b1ef into master Sep 6, 2026
@delchev
delchev deleted the intent/settlement-payment-delete branch September 6, 2026 13:19
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.

1 participant