Commit ca0a1f8
feat(showcase): demonstrate a multi-value reference seed (#3911)
`field_zoo` covered every field type with a real seeded value EXCEPT a
multi-value reference — the one shape #3911 was about. Adds
`f_lookups: Field.lookup('showcase_account', { multiple: true })`, seeded from
an array of natural keys (`['Northwind', 'Contoso']`) so each element resolves
independently to an account id.
That makes the specimen complete and doubles as a boot-time regression guard,
which is what field_zoo exists for: before the fix the array was rejected as a
non-string reference and the field vanished from the row, so the gallery
shipped silently missing one relational type.
The multi-value USER field (`f_users`) stays unseeded, now with the reason
recorded on the object: `sys_user` rows come from SIGN-UP, not seeds (see
security/seed-approval-demo.ts), so on a fresh boot no human user exists for a
natural key to resolve against. Authoring one would make the whole showcase
seed load report success: false on every first boot. The multi-value reference
mechanics the two fields share are covered by `f_lookups`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gusro3gdGv4wgbBnaFy9ah1 parent ac65bc5 commit ca0a1f8
2 files changed
Lines changed: 22 additions & 1 deletion
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
106 | 118 | | |
107 | 119 | | |
108 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
259 | 268 | | |
260 | 269 | | |
261 | 270 | | |
| |||
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
275 | | - | |
| 284 | + | |
276 | 285 | | |
277 | 286 | | |
278 | 287 | | |
| |||
0 commit comments