On this page
Ecto.Association.Has
The association struct for has_one
and has_many
associations.
Its fields are:
cardinality
- The association cardinalityfield
- The name of the association field on the schemaowner
- The schema where the association was definedrelated
- The schema that is associatedowner_key
- The key on theowner
schema used for the associationrelated_key
- The key on therelated
schema used for the associationqueryable
- The real query to use for querying associationon_delete
- The action taken on associations when schema is deletedon_replace
- The action taken on associations when schema is replaceddefaults
- Default fields used when building the associationrelationship
- The relationship to the specified schema, default is:child
preload_order
- Defaultorder_by
of the association, used only by preload
© 2013 Plataformatec
© 2020 Dashbit
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/ecto/Ecto.Association.Has.html