Commit 9057811
fix(lint): relationship/delete-behavior suggestion drops set_null on master_detail (#13668)
The `relationship/delete-behavior` suggestion in `lintDataModel` told an
author an undeclared `master_detail.deleteBehavior` could be `cascade`,
`restrict`, or `set_null`. Since #9689 (PR #11406, maintainer ruling
2026-08-19), an authored `deleteBehavior: 'set_null'` on a `master_detail`
field is a named parse-time rejection, so following the suggestion literally
walked an author into a publish-time error.
The message now enumerates only the two values FieldSchema actually accepts
on a master_detail (cascade/restrict — matching object.form.ts's
master_detail deleteBehavior options), and keeps the outcome-naming courtesy
of the parse-time rejection message: it still names set_null to say plainly
it is not honored on this type, and points to `lookup` for the case where
children must survive the parent. The `fix` payload was already correct and
is unchanged.
Claude-Session: https://claude.ai/code/session_01Pk26oZ12t5N1hwGW1m1MgC
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2cce3fd commit 9057811
3 files changed
Lines changed: 32 additions & 1 deletion
File tree
- .changeset
- packages
- cli/test
- lint/src
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
| 607 | + | |
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
| |||
0 commit comments