Commit abddef7
fix(loader): the bare-object error names the ladder, not just the escape hatch
ERR_OBJECT_FIELD_WITHOUT_OBJECT_REF fires at the exact moment an author
writes a shape they have not declared — and until now it answered with one
alternative, the open bag: "For an open/untyped JSON map use @dbColumnType:
jsonb on a field.string instead of a bare object." That is the last rung of a
three-rung ladder presented as the only rung, at the one moment the author is
most likely to take whatever the tool suggests. The authoring skill already
teaches the full ladder and says so explicitly ("the loader's pointer at
@dbColumnType: jsonb on that error is for the genuinely open case, not the
missing-VO case"); the loader itself did not.
All four ports now say the same thing, in each port's own quoting style:
a known key set → declare an object.value and @objectref it
dynamic keys, known value → field.map (@objectref or @valueType)
a bag no reader pins a key in → @dbColumnType: jsonb on a field.string
The rule and the code are unchanged — a bare field.object is still rejected,
with the same code and the same source envelope. Only the guidance changed.
expected-errors.json gates code + jsonPath, so no fixture churn; verified no
port test asserts the old substring (the two migrate-ts integration fixtures
that cited it in a COMMENT are corrected — both are legitimately on the last
rung, which is now said rather than implied).
docs/features/field-types.md listed 11 field subtypes where the registry
registers 17. The six missing rows (float, decimal, time, uri, inet, map) are
added with per-port native types read from each port's own mapper rather than
inferred, plus a footnote for the three rows that need one: the uri/inet
@lenient degrade, and field.map's real port coverage — Java's SpringTypeMapper
has no MapField arm, C# emits the property but DbContextGenerator writes no EF
storage mapping, and no persistence- or api-contract fixture exercises it on
any port.
Verified: TS metadata 2621/0; Python unit+conformance 947/0; C# MetaObjects
builds clean; Java metadata module compiles; scripts/ci-local.sh --quick
passed (leak-scan, fixture-lint, ts build+typecheck, conformance: typescript,
ts unit suites, doc-template drift, embedded-library drift all green).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTcEKXTQMYt84fAjuw5A2M1 parent 5096889 commit abddef7
9 files changed
Lines changed: 83 additions & 23 deletions
File tree
- docs/features
- fixtures/conformance
- server
- csharp/MetaObjects/Loader
- java/metadata/src/main/java/com/metaobjects
- loader
- util
- python/src/metaobjects/loader
- typescript/packages
- metadata/src/loader
- migrate-ts/test/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
24 | 51 | | |
25 | 52 | | |
26 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2919 | 2919 | | |
2920 | 2920 | | |
2921 | 2921 | | |
2922 | | - | |
2923 | | - | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
2924 | 2928 | | |
2925 | 2929 | | |
2926 | 2930 | | |
| |||
2951 | 2955 | | |
2952 | 2956 | | |
2953 | 2957 | | |
2954 | | - | |
2955 | | - | |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
2956 | 2964 | | |
2957 | 2965 | | |
2958 | 2966 | | |
| |||
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1893 | 1893 | | |
1894 | 1894 | | |
1895 | 1895 | | |
1896 | | - | |
1897 | | - | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
1898 | 1902 | | |
1899 | 1903 | | |
1900 | 1904 | | |
| |||
1931 | 1935 | | |
1932 | 1936 | | |
1933 | 1937 | | |
1934 | | - | |
1935 | | - | |
1936 | | - | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
1937 | 1944 | | |
1938 | 1945 | | |
1939 | 1946 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
191 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| |||
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3365 | 3365 | | |
3366 | 3366 | | |
3367 | 3367 | | |
3368 | | - | |
3369 | | - | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
3370 | 3374 | | |
3371 | 3375 | | |
3372 | 3376 | | |
| |||
3388 | 3392 | | |
3389 | 3393 | | |
3390 | 3394 | | |
3391 | | - | |
3392 | | - | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
3393 | 3401 | | |
3394 | 3402 | | |
3395 | 3403 | | |
| |||
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1672 | 1672 | | |
1673 | 1673 | | |
1674 | 1674 | | |
1675 | | - | |
1676 | | - | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
1677 | 1682 | | |
1678 | 1683 | | |
1679 | 1684 | | |
| |||
1699 | 1704 | | |
1700 | 1705 | | |
1701 | 1706 | | |
1702 | | - | |
| 1707 | + | |
1703 | 1708 | | |
1704 | 1709 | | |
1705 | 1710 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
0 commit comments