Skip to content

ParentChildHierarchy

Self-referencing hierarchy where members can have parent-child relationships within the same table, creating variable-depth structures. This hierarchy type is ideal for organizational charts, account hierarchies, or any structure where the depth varies by branch and members reference other members as parents. ParentChildHierarchies support recursive relationships and dynamic navigation without requiring fixed level definitions.

Extends

Attributes

NameIdTypeLowerUpper
nullParentValuefalseEString01
String value in the parent column that indicates root-level members (those without parents). Common values include '0', 'NULL', or empty string. This value identifies which members serve as the top-level roots of the hierarchy tree structure.
parentAsLeafEnablefalseBoolean01
Boolean flag that allows intermediate parent members to also appear as leaf members, enabling scenarios where the same entity functions both as a container and as a data point. When true, parents can have their own measures and participate in aggregations at multiple levels. Commonly used in account hierarchies where summary accounts also contain direct transactions.
parentAsLeafNameFormatfalseEString01
Format string for naming parent members when they appear as leaf nodes (used when parentAsLeafEnable=true). The format uses {0} as a placeholder for the original member name. Default format is '{0} (parent)' which creates names like 'Sales Manager (parent)' to distinguish the parent role from child member names.

References

NameTypeLowerUpperContainment
parentChildLinkParentChildLink🔗01true
Optional closure table configuration for performance optimization of parent-child queries. The closure table pre-computes all ancestor-descendant relationships, enabling efficient recursive queries and aggregations. When specified, provides significant performance benefits for deep hierarchies with complex drill-down operations.
parentColumnColumn🔗01false
Column containing the parent reference for each member, establishing the self-referencing relationship. This column typically contains the primary key value of the parent member, or the nullParentValue for root members. The column enables the recursive traversal that defines the hierarchy structure.
levelLevel🔗01false
Single level definition that applies to all members in this parent-child hierarchy. Unlike explicit hierarchies with multiple levels, parent-child hierarchies use one level definition that describes the properties and behavior of all members regardless of their position in the tree structure.

Used by

ClassDiagramm

Released under the Eclipse Public License 2.0