AshNeo4j.Error.UnsupportedManyToMany exception (AshNeo4j v0.10.0)

Copy Markdown View Source

Returned (never raised) when a relationship write resolves to a many-to-many modelled as back-to-back has_many — two resources each declaring a has_many to the other over one edge (#127). Ash anchors a has_many by an attribute on the related resource; with a has_many on both sides there is no to-one side to anchor the connect, so the data layer can't determine which node to relate. The edge itself already represents the many-to-many; the model just needs a to-one side on each hop to anchor the connect.

Model many-to-many with a joiner node instead — two to-one (belongs_to) hops through a join resource (Source →[E1] Join →[E2] Dest); see the Party → PlaceRef → Place example. Native many_to_many is tracked in #370.

Summary

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %AshNeo4j.Error.UnsupportedManyToMany{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  path: term(),
  related: term(),
  relationship: term(),
  resource: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Create an Elixir.AshNeo4j.Error.UnsupportedManyToMany without raising it.

Keys

  • :resource
  • :related
  • :relationship