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

Copy Markdown View Source

Returned (never raised) when an identity can't be enforced as a Neo4j uniqueness constraint (#20), so it can't be created by AshNeo4j.Constraint — and is refused rather than skipped, since silently leaving it unenforced would permit the duplicate/split records the constraint exists to prevent.

Two cases Neo4j's REQUIRE … IS UNIQUE can't express:

  • nils_distinct?: false — Neo4j treats nils as distinct (a node missing a listed property is not constrained) and can't be made to treat them as equal.
  • a filtered identity (where:) — Neo4j has no partial/filtered constraint.

Drop the unsupported option, or enforce that identity another way (it won't fall back to a database constraint). The same refusal is raised at compile time by AshNeo4j.Verifiers.VerifyIdentities.

Summary

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %AshNeo4j.Error.UnsupportedIdentity{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  identity: term(),
  keys: term(),
  path: term(),
  reason: term(),
  resource: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

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

Keys

  • :resource
  • :identity
  • :keys
  • :reason