Backing calculation for inherited_characteristic DSL declarations.
Traverses AssignmentRelationship by alias inward (this instance is the
target; follow to the source) to reach source instances, then reads each source's
typed characteristic at the declared role.
Injected automatically by TransformInheritedRefs — do not reference this module
directly; use the inherited_characteristic DSL entity inside characteristics do.
Cross-world resolution
Unlike inherited_place / inherited_party (which query universal PlaceRef /
PartyRef), the typed characteristic module varies per source resource. This calc
resolves it at runtime via AshNeo4j.worlds/1 on the source struct and
Diffo.Provider.Extension.Info.provider_characteristics/1 on the source's
outermost resource. Late-binding by design — the source resource may not exist at
the consumer's compile time.
Result shape
A list per input record. Each entry corresponds to one source instance reached by the traversal. The entry is:
- A
BaseCharacteristic-derived record (or a list of such records when the source's characteristic declaration is{:array, M}). %Diffo.Unknown{}when the source can't be projected to a loadable resource module, or its module declares no characteristic at this role.
Reason vocabulary (local to this world)
This calc emits %Diffo.Unknown{} with one of:
:no_concrete_world—AshNeo4j.worlds/1returned[]; the source struct has no labels resolvable to a loadedAshNeo4j.DataLayerresource. The:contextcarries%{source_id: id}.:role_not_declared— the outermost world's resource exists but itsprovider_characteristics/1has no entry for the declared role. The:contextcarries%{source_id: id, resource: module, role: atom}.
Per the Cross-domain lookups AGENTS.md section, reasons are world-local —
consumers in other worlds should treat them as opaque and (if composing) wrap
via :inner_unknown.
Summary
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.init/1.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.init/1.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.