View Source ArangoXEcto.Association.EdgeMany (ArangoX Ecto v2.0.0)
The association struct for a edge_many
association.
This is only to be used by an edge's :from
and :to
fields. This is
essentially the same as a BelongsTo association but modified to allow mupltiple
related fields.
This is needed because relational databases don't have the same ability to have multiple types of relation to the same name field like graph edges.
Note that this will still only have a cardinality of one. I.e. in an edge
the :from
field will still only reference one other schema but can
multiple different types of schemas.
The available fields are:
cardinality
- The association cardinality, always:one
field
- The name of the association field on the schemaowner
- The schema where the association was definedowner_key
- The key on theowner
schema used for the associationrelated
- The schema that is associatedrelated_key
- The key on therelated
schema used for the associationqueryables
- The real query to use for querying associationdefaults
- default fields used when building the associationrelationship
- The relationship to the specified schema, default:parent
on_replace
- The action taken on associations when schema is replaced
Summary
Types
@type t() :: %ArangoXEcto.Association.EdgeMany{ cardinality: :one, field: atom(), on_cast: nil | (... -> any()), on_replace: atom(), ordered: false, owner: atom(), owner_key: atom(), queryables: [atom()], related: [atom()], related_key: atom(), relationship: :parent, unique: true, where: Keyword.t() }