setRelationship

abstract fun setRelationship(relationshipId: String, classVersion: Int): SetRelationship

Replaces a relationship in full. Optional fields are set via the returned builder.

Every mutable field is overwritten. Omitting status or payload clears the stored value rather than preserving it, so a read-modify-write must send back every field it wants to keep. This cannot re-point or reclassify a relationship — the linked entities and the relationship class are immutable. Use updateRelationship to change part of a relationship.

Parameters

relationshipId

Identifier of the relationship to replace.

classVersion

Version of the relationship class the payload conforms to. Relationship classes are versioned (an integer >= 1); pass the version of the class you are targeting.