bcquality/microsoft/knowledge/data-modeling/owning-table-must-delete-dependents-in-ondelete.bad.al
Jesper Schulz-Wedde 4f0a13a801
Promote knowledge for Microsoft review skills (#153)
Move canonical knowledge for Microsoft-owned review domains into the Microsoft layer and document the skill/knowledge co-location policy.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
Copilot-Session: 2a6ea875-d38e-4f30-aadb-0d606f9be231
2026-09-03 15:06:01 +02:00

48 lines
1 KiB
AL

table 50100 "Order Header"
{
fields
{
field(1; "Entry No."; Integer)
{
DataClassification = CustomerContent;
}
}
keys
{
key(PK; "Entry No.")
{
Clustered = true;
}
}
// No OnDelete. Deleting a header silently orphans every Order Line that
// belonged to it. Nothing errors, and no page shows the stranded rows.
}
table 50101 "Order Line"
{
fields
{
field(1; "Line No."; Integer)
{
DataClassification = CustomerContent;
}
field(2; "Header Entry No."; Integer)
{
DataClassification = CustomerContent;
// Reads like referential integrity. It is lookup and input validation
// only: it propagates a RENAME of the parent key, and cascades nothing
// on DELETE.
TableRelation = "Order Header"."Entry No.";
}
}
keys
{
key(PK; "Line No.")
{
Clustered = true;
}
}
}