Member Junction
    Preparing search index...

    Function CreateRelatedEntitySectionKeyResolver

    • Builds a function that returns RelatedEntitySectionKey(relationship, displayInFormPeers) for any relationship, against the ONE peer set passed here. Build it once per peer set, then call it once per relationship. The relationship does not have to be in the peer set; it is keyed by how many peers share its related entity.

      Building counts each related entity once, so keying all n peers is O(n). Calling RelatedEntitySectionKey per peer is O(n²), which on an entity with ~150 DisplayInForm relationships (MJ: Users), resolved on every change-detection pass, pegged a CPU core. The returned function reflects the peers as they were when it was built.

      Parameters

      Returns (relationship: FormContributionRelationship) => string