Skip to content

DefinedRelationship: BaseRelationship with embedded characteristics, closed at creation #140

@matt-beanland

Description

@matt-beanland

Motivation

AssignedToRelationship conflates a general primitive with the Assigner's domain. We need a clean Provider resource for relationships whose characteristics are set at creation and never changed — once defined, that is it.

Proposed change

Provider.DefinedRelationship

Extends BaseRelationship (source, target, type, timestamps). Adds an embedded Characteristic attribute — a name/value pair embedded directly on the node rather than as separate graph Characteristic nodes:

attribute :characteristics, {:array, EmbeddedCharacteristic}

Actions: create and destroy only. No update, no relate/unrelate. The embedded characteristics are set at creation and closed thereafter — that is the definition.

Contrast with Provider.Relationship which extends BaseRelationship and allows mutable graph-based Characteristic nodes to be added/removed/updated over time.

DefinedRelationship is a general Provider primitive — useful for any relationship whose characteristics are a commitment made at creation time.

Acceptance criteria

  • Embedded Characteristic type defined (name + value)
  • Provider.DefinedRelationship resource with create/destroy only
  • Tests

Follow-on

Assigner refactor (#TBD) — update Assigner to use DefinedRelationship with type: :assigned_to and remove AssignedToRelationship.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions