#125 knowledge(data-modeling): TableRelation delete/rename asymmetry and the xRec before-image contract
Adds three community data-modeling knowledge articles, each with good and bad AL examples: owning tables must delete dependents in OnDelete, ValidateTableRelation = false also stops rename propagation, and xRec is a true before-image only in some triggers.
- 9files
- 9AL files
- 0objects
Pull request · merged into main on 2026-08-10 by StefanMaron · 9 files (+412 -0), 9 AL · other · tier official · reviewed (checked by Opus)
What changed
- Owning tables must delete dependent records manually since AL lacks cascading delete, and delete permissions are required on dependent tables
- Setting ValidateTableRelation to false suppresses rename propagation, not just input validation
- xRec is a true before-image only in OnRename and OnDelete, or in OnInsert/OnModify when triggered from a page, but reflects current Rec when those triggers fire from code
AL objects touched
community/knowledge/data-modeling/owning-table-must-delete-dependents-in-ondelete.bad.al: added, not in the BC? snapshot yetcommunity/knowledge/data-modeling/owning-table-must-delete-dependents-in-ondelete.good.al: added, not in the BC? snapshot yetcommunity/knowledge/data-modeling/owning-table-must-delete-dependents-in-ondelete.md: added, not in the BC? snapshot yetcommunity/knowledge/data-modeling/validate-table-relation-false-suppresses-rename-propagation.bad.al: added, not in the BC? snapshot yetcommunity/knowledge/data-modeling/validate-table-relation-false-suppresses-rename-propagation.good.al: added, not in the BC? snapshot yetcommunity/knowledge/data-modeling/validate-table-relation-false-suppresses-rename-propagation.md: added, not in the BC? snapshot yetcommunity/knowledge/data-modeling/xrec-is-a-before-image-only-in-some-triggers.bad.al: added, not in the BC? snapshot yetcommunity/knowledge/data-modeling/xrec-is-a-before-image-only-in-some-triggers.good.al: added, not in the BC? snapshot yetcommunity/knowledge/data-modeling/xrec-is-a-before-image-only-in-some-triggers.md: added, not in the BC? snapshot yet
Context
- Systems: development
Source: metadata of a merged pull request in microsoft/BCQuality (bcquality): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).