Interface RelationshipParams

interface RelationshipParams {
    relatedObjectId: string;
    relatingObjectId: string;
    schema?: string;
    type: string;
}

Properties

relatedObjectId: string

The related DataObject.

relatingObjectId: string

The relating DataObject.

schema?: string

The schema this Relationship belongs to. Optional.

  • If the owning DataModel's schema is defined (enforced mode), this value must match it or be omitted, and both the relating and related DataObjects must carry the same schema. DataModel.createRelationship rejects on any mismatch.

  • If the owning DataModel's schema is undefined (free mode), no schema checks are performed. The Relationship may freely connect DataObjects with different schemas, and is stored with whatever schema value the caller provided (falling back to the relating DataObject's schema when omitted).

type: string

The relationship type.