Member Junction
    Preparing search index...

    Class EntityRelationshipInfo

    Metadata about relationships between entities including display preferences for the UI. Defines foreign key relationships and how they should be represented in the user interface.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    __mj_CreatedAt: Date = null
    __mj_UpdatedAt: Date = null
    _configuration: string = null

    Raw string representation of Configuration from metadata.

    AdditionalFieldsToInclude: string = null

    Comma-delimited list of extra related-entity fields to project in base views.

    AutoUpdateAdditionalFieldsToInclude: boolean = true

    Whether CodeGen automatically updates AdditionalFieldsToInclude from schema metadata.

    AutoUpdateFromSchema: boolean = true
    • Field Name: AutoUpdateFromSchema
    • Display Name: Auto Update From Schema
    • SQL Data Type: bit
    • Default Value: true
    • Description: Indicates whether this relationship should be automatically updated by CodeGen. When set to 0, the record will not be modified by CodeGen. Defaults to true.
    BundleInAPI: boolean = null
    DisplayComponent: string = null
    DisplayComponentConfiguration: string = null
    DisplayComponentID: string = null
    DisplayIcon: string = null
    DisplayIconType: "None" | "Related Entity Icon" | "Custom" = 'Related Entity Icon'
    DisplayInForm: boolean = null
    DisplayLocation: "After Field Tabs" | "Before Field Tabs" = 'After Field Tabs'
    DisplayName: string = null
    DisplayUserViewID: string = null
    DisplayUserViewName: string = null
    Entity: string = null
    EntityBaseTable: string = null
    EntityBaseView: string = null
    EntityID: string = null
    EntityKeyField: string = null
    ID: string = null

    Primary Key

    IncludeInParentAllQuery: boolean = null
    JoinEntityInverseJoinField: string = null
    JoinEntityJoinField: string = null
    JoinView: string = null
    RelatedEntity: string = null
    RelatedEntityBaseTable: string = null
    RelatedEntityBaseTableCodeName: string = null
    RelatedEntityBaseView: string = null
    RelatedEntityClassName: string = null
    RelatedEntityCodeName: string = null
    RelatedEntityID: string = null
    RelatedEntityJoinField: string = null
    RelatedRecordCollection: string = null
    • Field Name: RelatedRecordCollection
    • SQL Data Type: nvarchar(MAX), nullable

    Optional JSON policy object declaring this relationship as a first-class related-record collection — a set of records that load, validate and persist as one unit with the parent. When non-null, CodeGen emits a typed DeclareRelatedRecords(...) declaration onto the generated entity subclass, so applications no longer hand-write it.

    Shape is IRelatedRecordCollectionConfig: Name (the generated property name, e.g. Lines), Load, OnRemove, OrderBy, Sequence and ClearAfterSave. RelatedEntity and RelatedEntityJoinField are deliberately not repeated inside the JSON — they are already columns on this row, and duplicating them would create two sources of truth with the JSON copy winning silently.

    null (the default, and every pre-6.2 row) means the relationship is not a declared collection: nothing is generated and nothing loads eagerly.

    guides/TRANSACTIONS_AND_BATCHING_GUIDE.md

    Sequence: number = null
    Type: string = null

    Accessors

    Methods

    • Copies initialization data from a plain object to the class instance. Only copies properties that already exist on the class to prevent creating new fields. Special handling for DefaultValue fields to extract actual values from SQL Server syntax.

      Parameters

      • initData: any

        The initialization data object

      Returns void

    • Default JSON serialization for BaseInfo subclasses.

      Emits all non-underscored direct field declarations. For _-prefixed private backing fields (the MJ pattern for collection storage — e.g. _Fields, _RelatedEntities, _OrganicKeys), emits the value of the corresponding same-named public getter instead. Purely computed getters without a backing field (display-name formatters, derived flags) are intentionally skipped — they can throw when source fields are null and don't belong on the wire anyway.

      A _-backed getter that throws is omitted from the output rather than aborting the whole serialization. That omission is safe ONLY because such getters are recomputable: the backing field is a lazy cache over other serialized state (e.g. QueryInfo.CategoryPath over CategoryID), so the value is rebuilt on the next access after a warm boot. Do not add a _-backed getter whose value cannot be recomputed from the serialized fields — a throw would silently drop it.

      Nested BaseInfo instances and arrays of them unwrap automatically via JSON.stringify's native toJSON() protocol.

      Subclasses may override to emit a filtered subset or custom shape (see EntityFieldValueInfo).

      Returns Record<string, unknown>