Profile: Self-referencing hierarchy

Table of Contents

This page is a named element-scope MASD profile instantiating ORE Studio Variability Model § "Profiles: naming a recurring configuration point". A model file binds to this profile (rather than authoring each feature individually) to guarantee the exact feature combination below, with no ad hoc variation.

Purpose

Models an entity that recursively contains instances of its own type — a corporate ownership structure, an organisational chart, any domain concept naturally shaped like a tree rather than a flat list. Distinct from the fk-scoped-child profile above: a child there belongs to a different parent entity type, whereas here the parent and child are the same type, and the relationship is optional (most rows have no parent at all).

Reference entity

counterparty — a party-like entity that can have a parent counterparty (a self-referencing soft foreign key), rendered as a tree via SQL's has_parent_id hierarchy function and the Qt hierarchy-tree paste seam. Adopting this profile also requires authoring two structural properties this table deliberately omits, because they are not features: :parent_id_column: (the self-referencing FK column name, e.g. parent_counterparty_id) and :hierarchy_name_field: (the display-label column, e.g. full_name) — see Codegen entity meta-model — SQL § "Hierarchy: has_parent_id" for why both are structural, not variability.

Assignments

One row per feature this profile fixes a value for — any feature not listed here is left to the model's own choice:

Feature Value
has_tenant_id true
has_workspace_id false
has_parent_id true
has_uuid_primary_key true
has_change_reason_cache true

Physical space

Address Enabled
ores.cpp.eventing-integration-test true

See also

Emacs 29.3 (Org mode 9.6.15)