diff --git a/src/main/java/org/spin/eca56/util/support/documents/MenuTree.java b/src/main/java/org/spin/eca56/util/support/documents/MenuTree.java index 4f28a7a..d78f82d 100644 --- a/src/main/java/org/spin/eca56/util/support/documents/MenuTree.java +++ b/src/main/java/org/spin/eca56/util/support/documents/MenuTree.java @@ -62,7 +62,8 @@ private List getChildren(int treeId, int parentId) { final String sql = "SELECT tn.Node_ID, tn.SeqNo " + "FROM " + tableName + " tn " + "WHERE tn.AD_Tree_ID = ? " - + "AND tn.Parent_ID = ?"; + + "AND COALESCE(tn.Parent_ID, 0) = ?" + ; List parameters = new ArrayList(); parameters.add(treeId); parameters.add(parentId); @@ -91,6 +92,7 @@ public MenuTree withNode(MTree tree) { documentDetail.put("internal_id", tree.getAD_Tree_ID()); documentDetail.put("id", tree.getUUID()); documentDetail.put("uuid", tree.getUUID()); + documentDetail.put("name", tree.getName()); List> childrenAsMap = new ArrayList<>(); children.forEach(child -> { Map nodeAsMap = convertNode(child);