Member Junction
    Preparing search index...

    Interface IDeclarativeParentStateLockPolicy

    Declarative cross-entity policy locking child creates/updates/deletes based on a parent record's status. Configured in EntityInfo.Settings ('CrossEntityPolicies') or IEntityConfiguration.CrossEntityPolicies.

    interface IDeclarativeParentStateLockPolicy {
        allowedParentStates?: string[];
        allowOrphanWhenForeignKeyNull?: boolean;
        errorMessage?: string;
        exemptOperations?: string[];
        forbiddenParentStates?: string[];
        foreignKeyField: string;
        kind?: "ParentStateLock";
        operations?: EntityWriteOperation[];
        parentEntityName: string;
        parentKeyField?: string;
        parentStatusField: string;
        policyKey?: string;
    }
    Index

    Properties

    allowedParentStates?: string[]

    If specified, child writes are permitted ONLY when the parent's status is in this list.

    allowOrphanWhenForeignKeyNull?: boolean

    Default true: skip parent lookup when foreignKeyField is null/empty. Set false to refuse orphans.

    errorMessage?: string

    Optional custom refusal message.

    exemptOperations?: string[]

    Server operation keys (via ServerOperationScopeManager) exempted from this parent lock.

    forbiddenParentStates?: string[]

    If specified, child writes are refused when the parent's status is in this list.

    foreignKeyField: string

    Foreign-key column on THIS child entity (e.g. 'OrderHeaderID', 'JournalEntryID', 'ElectionID').

    kind?: "ParentStateLock"
    operations?: EntityWriteOperation[]

    Which child operations this lock governs. Defaults to ['Create', 'Update', 'Delete'].

    parentEntityName: string

    Target parent entity name (e.g. 'Orders', 'Journal Entries', 'Elections').

    parentKeyField?: string

    Primary-key column on the parent entity. Defaults to 'ID'.

    parentStatusField: string

    Status column on the parent entity (e.g. 'Status').

    policyKey?: string