Skip to content

Commit

Permalink
include child in all its super types
Browse files Browse the repository at this point in the history
  • Loading branch information
szakrewsky committed Nov 18, 2016
1 parent a0bd0ee commit 911cb9f
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,14 @@ public Map<String, Object> postProcessAllModels(Map<String, Object> objs) {
// Let parent know about all its children
for (String name : allModels.keySet()) {
CodegenModel cm = allModels.get(name);
if (cm.parent == null) continue;
CodegenModel parent = allModels.get(cm.parent);
if (parent == null) continue;
if (parent.children == null) {
parent.children = new ArrayList<CodegenModel>();
while (parent != null) {
if (parent.children == null) {
parent.children = new ArrayList<CodegenModel>();
}
parent.children.add(cm);
parent = allModels.get(parent.parent);
}
parent.children.add(cm);
}
}
return objs;
Expand Down

0 comments on commit 911cb9f

Please sign in to comment.