Skip to content

Commit a2d65fb

Browse files
committed
no-mistakes(document): Scope Java map-PATCH claims; record TPH map-validation gap
1 parent 13278de commit a2d65fb

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

  • server/java/codegen-spring/src/main/java/com/metaobjects/generator/spring

server/java/codegen-spring/src/main/java/com/metaobjects/generator/spring/KNOWN_GAPS.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,23 @@ array, distinct from present-null → SQL NULL).
160160

161161
**`field.map` (dict-of-VO) now ships** on the DTO / `<Entity>Patch` / controller / value-object
162162
walk: the component types as `Map<String, V>`, `@Valid` cascades into the map's values on POST,
163-
and PATCH validates each value explicitly. That entry used to say a persistence-conformance
164-
roundtrip column was needed first; the CODEGEN rung did not in fact depend on it, and the gate
163+
and PATCH validates each value explicitly — vanilla handler; the TPH carve-out is below.
164+
That entry used to say a persistence-conformance roundtrip column was needed first; the
165+
CODEGEN rung did not in fact depend on it, and the gate
165166
it named is still open and still the right one — for the RUNTIME tier, not this one. OMDB does
166167
not read or write a map (its jsonb path keys off the `@storage` attr a map does not carry), so a
167168
mapped column is generated-code-only until that lands. See `docs/features/field-types.md`.
168169

169170
**Still staged out** (tracked follow-ups): the Kotlin `field.string @dbColumnType=jsonb`
170171
open-bag PATCH (needs a kotlinx `parseToJsonElement` bridge).
171172
TPH entities with VO columns also remain out of scope (the TPH union skips
172-
`ObjectField`).
173+
`ObjectField`). A `field.map` is the one nested-value shape that DOES reach the TPH
174+
artifacts — the TPH settable set is `scalarFields` MINUS pk/discriminator/auto-set, and
175+
`scalarFields` skips only `ObjectField` — but the TPH write paths validate per field via
176+
`validateValue`, which does not cascade, so a map's values are accepted UNVALIDATED on TPH
177+
create/PATCH (the `@Valid` on the `<Sub>Dto` component is decorative there). Before the
178+
`MapField` type-mapper arm, a map-bearing TPH entity failed generation outright, so this
179+
shape is newly reachable and untested by any gate.
173180

174181
## `SpringPayloadGenerator.resolveObjectByShortOrFqn` has zero in-repo callers
175182

0 commit comments

Comments
 (0)