You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c2bc4e2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(migrate-ts,codegen-kotlin): review fixes for the ADR-0047 correlation
Four review findings on the previous commit, all fixed:
1. HIGH - tier 2 was an exact-string match, so a child-side relationship
authored with an FQN @objectref missed tier 2 and the new parent-side
tier OVERRODE the child's declaration (association restrict silently
became composition cascade). Tier 2 now matches package-aware against
the resolved @references target (refMatchesObject / ADR-0042), with a
legacy exact-string fallback only when the target does not resolve.
2. MEDIUM - tier 2 had no @through guard: an M:N relationship wrongly
correlated with a sibling DIRECT FK to the same target, arming cascade
on it. The M:N exclusion now applies at both relationship tiers
(matching the Kotlin mirror, which already excluded it).
3. LOW - the tier-3 satisfiability guard discarded the whole reverse
relationship including an AUTHORED @onUpdate. It now drops only the
inferred contributions; an explicit @onUpdate survives. Mirrored in
Kotlin.
4. LOW - Kotlin findReverseRelationship omitted TS's "the single
enforced reference must be the one being resolved" clause; aligned
(a soft @Enforce:false reference never correlates).
ADR-0047 amended: tier-2 matching + guard wording, and the blanket
"existing models are byte-identical" claim replaced with the precise
output-compatibility contour (the FQN child-side shape now correlates -
intent previously silently dropped). CHANGELOG gains a prominent
adopter-visible callout: the first migrate after upgrade adds ON DELETE
actions to live FKs whose parent-side relationship was previously
ignored - production delete semantics change deliberately.
Gates re-run green: migrate-ts 426 (4 new pins, one per finding),
view-lifecycle sqlite + real-Postgres byte-compat, TS conformance 534,
migrate-ts typecheck, codegen-kotlin mvn.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KTGT5ksntpcJDZVJ5VyXHS
Copy file name to clipboardExpand all lines: server/java/codegen-kotlin/src/main/kotlin/com/metaobjects/generator/kotlin/KotlinExposedTableGenerator.kt
+32-18Lines changed: 32 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1382,39 +1382,53 @@ open class KotlinExposedTableGenerator : MultiFileDirectGeneratorBase<MetaObject
0 commit comments