• Type Parameters

    Parameters

    • collectionId: string

      The ID of the collection that contains the referring item.

    • propertyName: Extract<keyof CItem, string>

      The property to replaces the references in.

    • referringItem: Item | ItemID

      The referring item or referring item's ID.

    • referencedItem:
          | Item
          | ItemID
          | Item[]
          | ItemID[]

      The referenced item, referenced item's ID, an array of referenced items, or an array of referenced item IDs.

    • Optionaloptions: WeivDataOptions

      An object containing options to use when processing this operation.

    Returns Promise<void>

    Fulfilled - When the references have been inserted into relation array field. Rejected - The error that caused the rejection.

    Replaces current references with references in the specified property. *This function uses update function internally.