method

LocalAPI.MutateJoin

func (local *LocalAPI) MutateJoin( ctx context.Context, collection, id, field string, additions, removals []string, actor *store.Document, localeOptions ...LocaleOptions, ) (JoinMutationResult, error)

Atomically add and remove inverse-relation target IDs.

Source core/local.go:525

@param ctx
The ctx value.
@param collection
The collection value.
@param id
The id value.
@param field
The field value.
@param additions
The additions value.
@param removals
The removals value.
@param actor
The actor value.
@param localeOptions
The localeOptions value.
@returns
The declared result.

Applies deltas without requiring the caller to load the complete relationship set. MutateJoinWithOptions adds revision, locale, and response controls.

Related types

  • LocalAPI

    In-process content operations that share the REST authorization and lifecycle pipeline.

  • Document

    A stored document with status and version metadata.

  • LocaleOptions

    Locale selection for one single-document Local API operation.

  • JoinMutationResult

    Result of one atomic inverse-relationship mutation.