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 b4abd86
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: server/java/codegen-kotlin/src/main/kotlin/com/metaobjects/generator/kotlin/KotlinExposedTableGenerator.kt
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -843,8 +843,9 @@ open class KotlinExposedTableGenerator : MultiFileDirectGeneratorBase<MetaObject
843
843
844
844
for (entity in loader.metaObjects) {
845
845
if (entity.subType !=MetaObject.SUBTYPE_ENTITY) continue
846
-
for (child in entity.children) {
847
-
if (child !isMetaRelationship) continue
846
+
// ADR-0039: relationships are inheritable — RESOLVE via entity.relationships;
847
+
// entity.children (own-only) would miss an inherited relationship.
848
+
for (child in entity.relationships) {
848
849
if (child.subType !=CompositionRelationship.SUBTYPE_COMPOSITION) continue
849
850
850
851
val objectRef = child.objectRef ?:continue
@@ -1016,7 +1017,9 @@ open class KotlinExposedTableGenerator : MultiFileDirectGeneratorBase<MetaObject
1016
1017
val acc = linkedMapOf<String, MutableMap<String, RefDecoration>>()
1017
1018
for (entity in loader.metaObjects) {
1018
1019
if (entity.subType !=MetaObject.SUBTYPE_ENTITY) continue
1019
-
for (child in entity.children) {
1020
+
// ADR-0039: identity.reference children are inheritable — RESOLVE via
1021
+
// getIdentities(true); entity.children (own-only) would miss inherited FK refs.
Copy file name to clipboardExpand all lines: server/java/codegen-kotlin/src/main/kotlin/com/metaobjects/generator/kotlin/KotlinOutputParserGenerator.kt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -81,8 +81,8 @@ open class KotlinOutputParserGenerator : MultiFileDirectGeneratorBase<MetaObject
81
81
val outRoot =Paths.get(outDir.absolutePath)
82
82
83
83
// Stable name order — matches TS/C#/Python deterministic emission.
84
-
val outputs = loader.root.children
85
-
.filterIsInstance<OutputTemplate>()
84
+
// ADR-0039: root-scan discipline — resolving children accessor.
85
+
val outputs = loader.root.getChildren(OutputTemplate::class.java, true)
Copy file name to clipboardExpand all lines: server/java/codegen-kotlin/src/main/kotlin/com/metaobjects/generator/kotlin/KotlinOutputPromptGenerator.kt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -74,8 +74,8 @@ open class KotlinOutputPromptGenerator : MultiFileDirectGeneratorBase<MetaObject
74
74
val outRoot =Paths.get(outDir.absolutePath)
75
75
76
76
// Stable name order — matches TS/C#/Python/Java deterministic emission.
77
-
val outputs = loader.root.children
78
-
.filterIsInstance<OutputTemplate>()
77
+
// ADR-0039: root-scan discipline — resolving children accessor.
78
+
val outputs = loader.root.getChildren(OutputTemplate::class.java, true)
Copy file name to clipboardExpand all lines: server/java/codegen-kotlin/src/main/kotlin/com/metaobjects/generator/kotlin/KotlinRenderHelperGenerator.kt
+15-8Lines changed: 15 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -79,8 +79,8 @@ open class KotlinRenderHelperGenerator : MultiFileDirectGeneratorBase<MetaObject
79
79
val provider =FilesystemProvider(Paths.get(templateRoot))
80
80
81
81
// Stable name order — matches the other ports' deterministic emission.
82
-
val outputs = loader.root.children
83
-
.filterIsInstance<OutputTemplate>()
82
+
// ADR-0039: root-scan discipline — resolving children accessor.
83
+
val outputs = loader.root.getChildren(OutputTemplate::class.java, true)
84
84
.sortedBy { it.name }
85
85
86
86
for (tmpl in outputs) {
@@ -254,6 +254,9 @@ open class KotlinRenderHelperGenerator : MultiFileDirectGeneratorBase<MetaObject
0 commit comments