Member Junction
    Preparing search index...

    Walks entity relationship graphs to discover records for version labeling.

    Reverse: Uses the entity's RelatedEntities (EntityRelationship metadata) to find child records. This is curated by CodeGen and admins — only explicitly registered One-To-Many relationships are walked.

    Forward: Scans the current entity's own FK fields to find records it references (e.g., AI Agent Prompt → AI Prompt via PromptID). Skips system/infrastructure fields (UserID, CreatedBy, etc.).

    Records found via reverse walk are "owned children" and get full treatment (both reverse + forward walks). Records found via forward walk are "referenced records" and only get forward-only treatment (their own FK refs are followed, but their EntityRelationship children are NOT discovered).

    This prevents the classic explosion pattern:

    AgentAgentPromptPrompt → [reverse to ALL PromptModels] → Model
    → [reverse to ALL AgentModels across ALL agents] → explosion!

    With discovery mode:

    AgentAgentPrompt(reverse,full) → Prompt(forward,forward-only)
    Model(forward,forward-only) → STOP (no reverse walk on Model)

    A set of entity names on the current path from root to the current node is maintained. When evaluating any relationship, if the target entity type is already on the ancestor stack, it is skipped. This is a secondary safety net that prevents cycles even within full-mode walks.

    • Only walks entities with TrackRecordChanges === true
    • Skips system FK fields via regex patterns (UserID, CreatedBy, etc.)
    • Respects ExcludeEntities and EntityFilter options
    • Uses a global visited set for record-level cycle detection
    Index

    Constructors

    Accessors

    Methods